STINNER Victor <[email protected]> added the comment:
test_shared_memory_cleaned_after_process_termination() uses time as a weak
synchronization primitive:
# killing abruptly processes holding reference to a shared memory
# segment should not leak the given memory segment.
p.terminate()
p.wait()
time.sleep(1.0) # wait for the OS to collect the segment
with self.assertRaises(FileNotFoundError):
smm = shared_memory.SharedMemory(name, create=False)
Would it be possible to use a more reliable synchronization? Such test usually
fail randomly.
https://pythondev.readthedocs.io/unstable_tests.html
----------
nosy: +vstinner
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36867>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com