Skip to content

Commit

Permalink
Ensure created task has a ref. Fixes #87 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrh authored Aug 5, 2024
1 parent 91364f2 commit bebb8b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiorun.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def coro_proxy():

new_coro = coro_proxy() # We'll taskify this one instead of coro.
_DO_NOT_CANCEL_COROS.add(new_coro) # The new task must not be cancelled.
loop.create_task(new_coro) # Make the task
_background_task = loop.create_task(new_coro) # Make the task

# Ok, so we *could* simply return fut. Callers can await it as normal,
# e.g.
Expand Down

0 comments on commit bebb8b9

Please sign in to comment.