消息 [342309]
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 |
|
| 日期 |
用户 |
动作 |
参数 |
| 2019-05-13 10:58:46 | vstinner | 修改 | recipients:
+ vstinner, pitrou, pablogsal, xtreak, pierreglaser |
| 2019-05-13 10:58:46 | vstinner | 修改 | messageid: <1557745126.08.0.293259897459.issue36867@roundup.psfhosted.org> |
| 2019-05-13 10:58:46 | vstinner | 链接 | issue36867 messages |
| 2019-05-13 10:58:45 | vstinner | 创建 | |
|