Message355227
test_run_coroutine_threadsafe_with_timeout() has a race condition. It relies on "await asyncio.sleep(0.05)" synchronization primitive. That's not reliable.
async def add(self, a, b, fail=False, cancel=False):
"""Wait 0.05 second and return a + b."""
await asyncio.sleep(0.05)
if fail:
raise RuntimeError("Fail!")
if cancel:
asyncio.current_task(self.loop).cancel()
await asyncio.sleep(0)
return a + b |
|
Date |
User |
Action |
Args |
2019-10-23 15:01:22 | vstinner | set | recipients:
+ vstinner |
2019-10-23 15:01:22 | vstinner | set | messageid: <1571842882.18.0.409580310759.issue38564@roundup.psfhosted.org> |
2019-10-23 15:01:22 | vstinner | link | issue38564 messages |
2019-10-23 15:01:22 | vstinner | create | |
|