-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiprocessing.managers. SharedMemoryManager should let you name the created object #101014
Comments
I feel there are alternatives to this feature. After you create a piece of shared memory, you get a proxy to it. If you need any other process to use this piece, just pass this proxy to the other process. But pickling in I'm thinking of creating a new issue with some bug fixes. I'm researching existing issues in prep for that. |
This will run into a problem because apparently, the 'proxy' is an actual file descriptor. So calling "ShareableList" and storing its proxy too many times will run into the |
Python's new truly-shared memory (https://docs.python.org/3/library/multiprocessing.shared_memory.html) is great, however using the
SharedMemoryManager
is impractical since the created list or numpy array can't be custom-named.Why would we want to custom-name?
Well, say process 3 creates a new object and process 5 wants to access it. Without a shared naming protocol, this isn't possible. Process 3 has to read the name for its newly created object and somehow signal it to process 5 in order for process 5 to ever know about it and access it.
We should be able to name the objects created with the
SharedMemoryManager
, with thename=
parameter, same as the syntax for creating those objects without the manager.Thanks,
Sam
Linked PRs
The text was updated successfully, but these errors were encountered: