3 ms·
> no pickling, sockets, or unpickling But still copying? If not, then how does it interoperate with garbage collection?
by amelius 7y ago
> no pickling, sockets, or unpickling
But still copying?
If not, then how does it interoperate with garbage collection?
- fulafel 7y agoIt works with the memoryview/buffer interface, so you can have eg a Numpy array backed by a sharedmemory object attached to a named SM segment. So it's not for containing normal Python dicts, strings etc that are individually tracked by GC. https://docs.python.org/3.8/library/multiprocessing.shared_memory.html https://docs.python.org/3.8/library/multiprocessing.shared_m...