From c21e4366fb64130d168150f0ed94293e699eb525 Mon Sep 17 00:00:00 2001 From: bd Date: Sat, 14 Jun 2025 14:55:27 -0400 Subject: Begin work of monkey-patching EPollSelector --- tests/simult.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'tests/simult.py') diff --git a/tests/simult.py b/tests/simult.py index 61a3792..49d3e4b 100644 --- a/tests/simult.py +++ b/tests/simult.py @@ -1,20 +1,17 @@ import asyncio -import time -async def count(x): - i = 0 - await asyncio.sleep(2) - while i < 100000: - z = x * x - z = z * z - z = z * z - i += 1 - return z +async def count(): + print("before") + await asyncio.sleep(3) + print("after") async def main(): - await asyncio.gather(count(1), count(2), count(3)) + await asyncio.gather(count(), count(), count()) + i = 0 + while i < 3000000: + i += 1 print("done") asyncio.run(main()) -- cgit v1.2.3