Skip to content

Commit

Permalink
Test getting rid of event loop gc
Browse files Browse the repository at this point in the history
  • Loading branch information
zangell44 committed Jan 9, 2024
1 parent 3d844e2 commit da054a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/prefect/utilities/asyncutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import asyncio
import ctypes
import inspect
import sys
import threading
import warnings
from contextlib import asynccontextmanager
Expand Down Expand Up @@ -334,7 +335,8 @@ async def on_shutdown(key):
EVENT_LOOP_GC_REFS[key] = on_shutdown(key)

# Begin iterating so it will be cleaned up as an incomplete generator
await EVENT_LOOP_GC_REFS[key].__anext__()
if not sys.version_info > (3, 11):
await EVENT_LOOP_GC_REFS[key].__anext__()


class GatherIncomplete(RuntimeError):
Expand Down

0 comments on commit da054a1

Please sign in to comment.