diff options
| author | bd <bdunahu@operationnull.com> | 2025-07-19 23:22:13 -0600 |
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-07-19 23:22:13 -0600 |
| commit | 0c0af7dd5a9d1c30820b52f8209151f0f2d5610d (patch) | |
| tree | 018652147dee18477ac89f073ccb31f4d84ee7ef /t/eager_and_scheduled.py | |
| parent | ac55d9ff0b588b91202ccad72ee71e508e33ad08 (diff) | |
Fix a bug where inactive loops would be indexed (read desc)
Cleaned up Aergia.walk_back_until_loop to only get running event loops. Previously, this manifested as a bug. The asyncio.Process class would fork off a thread, and the event loop would be found in that thread's local variables, even though that thread was not executing that event loop. This would result in get_event_loops containing duplicate values, and affected event loops would be assigned duplicate time
Diffstat (limited to 't/eager_and_scheduled.py')
| -rw-r--r-- | t/eager_and_scheduled.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/eager_and_scheduled.py b/t/eager_and_scheduled.py index 178a9f4..030b539 100644 --- a/t/eager_and_scheduled.py +++ b/t/eager_and_scheduled.py @@ -8,7 +8,8 @@ async def foo(): async def bar(): - await asyncio.create_subprocess_shell('sleep 1.0') + proc = await asyncio.create_subprocess_shell('sleep 1.0') + await proc.communicate() async def baz(): |
