Message336182
The simpler API is now implemented in GH-11816 as discussed previously. Notably:
> * We go with this simpler API: SharedMemory(name=None, create=False, size=0)
> * 'size' is ignored when create=False
> * create=True acts like O_CREX and create=False only attaches to existing shared memory blocks
As part of this change, the PosixSharedMemory and WindowsNamedSharedMemory classes are no more; they have been consolidated into the SharedMemory class with a single, simpler, consistent-across-platforms API.
On the SharedMemory class, 'size' is now stored by the __init__ and does not use fstat() as part of its property.
Also, SharedMemoryManager (and its close friends) has been relocated to the multiprocessing.managers submodule, matching the organization @Giampaolo outlined previously:
multiprocessing.managers.SharedMemoryManager
multiprocessing.managers._SharedMemoryTracker
multiprocessing.managers.SharedMemoryServer (not documented)
multiprocessing.shared_memory.SharedMemory
multiprocessing.shared_memory.SharedList
multiprocessing.shared_memory.WindowsNamedSharedMemory (REMOVED)
multiprocessing.shared_memory.PosixSharedMemory (REMOVED)
I believe this addresses all of the significant discussion topics in a way that brings together all of the excellent points being made. Apologies if I have missed something -- I did not think so but I will go back through all of the discussions tomorrow to double-check. |
|
Date |
User |
Action |
Args |
2019-02-21 05:25:04 | davin | set | recipients:
+ davin, brett.cannon, nascheme, rhettinger, terry.reedy, ronaldoussoren, pitrou, osvenskan, giampaolo.rodola, skrah, pmpp, lukasz.langa, eric.snow, yselivanov |
2019-02-21 05:25:04 | davin | set | messageid: <1550726704.06.0.808688921006.issue35813@roundup.psfhosted.org> |
2019-02-21 05:25:04 | davin | link | issue35813 messages |
2019-02-21 05:25:03 | davin | create | |
|