Skip to content

Commit

Permalink
prevent cyclic garbage creation
Browse files Browse the repository at this point in the history
  • Loading branch information
richardsheridan committed Oct 21, 2023
1 parent 27ac88a commit 06c176c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions trio/_core/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,7 @@ def aborted(raise_cancel: _core.RaiseCancelT) -> Abort:
exn = capture(raise_cancel).error
if not isinstance(exn, Cancelled):
self._add_exc(exn)
del exn # prevent cyclic garbage creation
return Abort.FAILED

self._parent_waiting_in_aexit = True
Expand Down

0 comments on commit 06c176c

Please sign in to comment.