Skip to content

Commit

Permalink
Update src/trio/_core/_asyncgens.py
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Oct 17, 2024
1 parent 0ec9f8a commit 1504187
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trio/_core/_asyncgens.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ def finalizer(agen: AsyncGeneratorType[object, NoReturn]) -> None:
agen_name = name_asyncgen(agen)
try:
self.foreign.remove(id(agen))
is_ours = False
except KeyError:
is_ours = True
else:
is_ours = False

if is_ours:
runner.entry_queue.run_sync_soon(
Expand Down

0 comments on commit 1504187

Please sign in to comment.