Olivier Grisel <olivier.gri...@ensta.org> added the comment:
As Victor said, the `time.sleep(1.0)` might lead to Heisen failures. I am not sure how to write proper strong synchronization in this case but we could instead go for something intermediate such as the following pattern: ... p.terminate() p.wait() for i in range(60): try: shared_memory.SharedMemory(name, create=False) except FileNotFoundError: # the OS successfully collected the segment as expected break time.sleep(1.0) # wait for the OS to collect the segment else: raise AssertionError(f"Failed to collect shared_memory segment {name}") What do you think? ---------- nosy: +Olivier.Grisel _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36867> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com