Eryk Sun <eryk...@gmail.com> added the comment:
> register the shared the shared_memory only when it's created and > not when it's attached. In Windows, the section object is reference counted. I haven't looked into the Unix implementation, but maybe it could use advisory locking. After opening shared memory via shm_open, a process would try to acquire a shared lock on the fd. If it can't acquire the lock, close the fd and fail the open. When exiting, a process would remove its shared lock and try to acquire an exclusive lock. If it acquires an exclusive lock, it should call shm_unlink because it's the last reference. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37754> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com