-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let SharedMemory and NDArray support
with
blocks
To do this, we subclass Python's SharedMemory class, rather than simply passing it along verbatim anymore. And we implement the __exit__ method to call the Appose SharedMemory subclass's dispose() method, which calls either close() or unlink() depending on whether the unlink_on_dispose flag is set. Note that this implementation cannot quite align with the Java one, because in Java, the AutoCloseable interface always calls close(). As such, the close() method must be overridden and taught to sometimes call unlink(), and sometimes not, depending on the unlinkOnClose flag.
- Loading branch information
Showing
3 changed files
with
112 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters