We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c61d03 commit efd6bfbCopy full SHA for efd6bfb
1 file changed
tests/utils/test_aio.py
@@ -37,8 +37,12 @@ async def _hold_condition():
37
task = asyncio.ensure_future(_hold_condition())
38
await asyncio.sleep(0.1)
39
40
- async with test_cond:
41
- await aioutils.wait_condition_or_timeout(test_cond, 0.1)
+ async def _async_wait_or_timeout():
+ async with test_cond:
42
+ await aioutils.wait_condition_or_timeout(test_cond, 0.1)
43
+
44
+ # Test high lock contention
45
+ await asyncio.gather(*[_async_wait_or_timeout() for _ in range(100)])
46
47
task.cancel()
48
with contextlib.suppress(asyncio.CancelledError):
0 commit comments