diff options
| author | bd <bdunahu@operationnull.com> | 2025-06-10 15:03:51 -0400 |
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-06-10 15:03:51 -0400 |
| commit | 669534099639907a0813b6c66b29e9d1ca95229e (patch) | |
| tree | 338d6455df31ff75fb30e3de70c967673a4d69a4 /tests/simult-busy.py | |
| parent | 5d7f40a890a1a1dd6dc7dc2982308932ba86cc42 (diff) | |
Add 'async-off' flag for comparison, add comments
Diffstat (limited to 'tests/simult-busy.py')
| -rw-r--r-- | tests/simult-busy.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/simult-busy.py b/tests/simult-busy.py deleted file mode 100644 index 4cc4b2a..0000000 --- a/tests/simult-busy.py +++ /dev/null @@ -1,25 +0,0 @@ -import asyncio -import time - -async def busy_task(): - await asyncio.sleep(3.0) - return 1 - -async def main(): - tasks = [asyncio.create_task(busy_task()) for i in range(5)] - - start_time = time.time() - try: - # this is to prevent waiting in 'select' all day, - # which makes the python intepreter not respond to - # mini-scalene / SCALENE - while True: - if time.time() - start_time > 3.5: - break - await asyncio.sleep(0) # yield - except KeyboardInterrupt: - pass - finally: - print("Done.") - -asyncio.run(main()) |
