Rauan Mukhamejanov <rauan.ar...@gmail.com> added the comment:

Not sure about "it can always be accessed and closed/unlinked by any process 
later on", as each process will be spawning its own resource_tracker, using a 
separate pipe. Thus, unregister calls from other processes will not have any 
effect. 

The documentation is indeed unclear that processes must share the 
resource_tracker. Can we introduce a new flag - "persist", that would indicate 
no resource tracking is needed? Registering will only happen if create=True and 
persist=False, meaning the user accepts the creating process must outlive all 
other processes that could connect to the shared memory. If persist=False, the 
user accepts the responsibility for manual cleaning up of the allocated memory. 
This will allow catering to a wider range of use cases, where readers/writer 
processes can exit and re-connect to shared_memory as they see fit.

----------
nosy: +rauanargyn

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39959>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to