From 8170b42faa9b45c415428a7ce5a6c449c9042df4 Mon Sep 17 00:00:00 2001 From: richardsheridan Date: Sat, 30 Jan 2021 22:09:41 -0500 Subject: [PATCH] Document missing deletion tests --- trio/_core/_run.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trio/_core/_run.py b/trio/_core/_run.py index 14a61933db..807e330c1d 100644 --- a/trio/_core/_run.py +++ b/trio/_core/_run.py @@ -2219,12 +2219,15 @@ def unrolled_run(runner, async_fn, args, host_uses_signal_set_wakeup_fd=False): # which works for at least asyncio and curio. runner.reschedule(task, exc) task._next_send_fn = task.coro.throw + # prevent long-lived reference + # TODO: develop test for this deletion del msg if "after_task_step" in runner.instruments: runner.instruments.call("after_task_step", task) del GLOBAL_RUN_CONTEXT.task - # prevent long-lived task reference + # prevent long-lived references + # TODO: develop test for these deletions del task, next_send, next_send_fn except GeneratorExit: