Message342319
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? |
|
Date |
User |
Action |
Args |
2019-05-13 12:50:35 | Olivier.Grisel | set | recipients:
+ Olivier.Grisel, pitrou, vstinner, pablogsal, xtreak, pierreglaser |
2019-05-13 12:50:35 | Olivier.Grisel | set | messageid: <1557751835.55.0.780755595425.issue36867@roundup.psfhosted.org> |
2019-05-13 12:50:35 | Olivier.Grisel | link | issue36867 messages |
2019-05-13 12:50:35 | Olivier.Grisel | create | |
|