Skip to content

A public function to close memmap - #17939

Closed
yoonghm wants to merge 1 commit into
numpy:masterfrom
yoonghm:patch-2
Closed

yoonghm wants to merge 1 commit into
numpy:masterfrom
yoonghm:patch-2

Conversation

@yoonghm

@yoonghm yoonghm commented Dec 6, 2020

Copy link
Copy Markdown

Create a public function close() to properly close mmap

See Method to explicitly close memmap #13510, there are two ways to un-mapped a memory-mapped file:
a. del fp or
b. fp._mmap.close()

The first method may leave the file locked for a long period of time. The second method exposes internal variable _mmap.

The solution provides public function to close the memmap object.

Create a public function `close()` to properly close mmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant