From 3bf8564b50cb56b7494d2196a4a062c6f2d21c67 Mon Sep 17 00:00:00 2001 From: "Nathaniel J. Smith" Date: Mon, 30 Jul 2018 01:18:28 -0700 Subject: [PATCH] Use always_abort=True to slightly simplify wait_all_tasks_blocked --- trio/_core/_run.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/trio/_core/_run.py b/trio/_core/_run.py index e4b00cf81e..8b9e0acce7 100644 --- a/trio/_core/_run.py +++ b/trio/_core/_run.py @@ -1090,7 +1090,7 @@ def abort(_): del self.waiting_for_idle[key] return Abort.SUCCEEDED - await wait_task_rescheduled(abort) + await wait_task_rescheduled(abort, always_abort=True) ################ # Instrumentation @@ -1340,7 +1340,6 @@ def run_impl(runner, async_fn, args): while runner.waiting_for_idle: key, task = runner.waiting_for_idle.peekitem(0) if key[:2] == (cushion, tiebreaker): - del runner.waiting_for_idle[key] runner.reschedule(task) else: break