Skip to content

Commit

Permalink
Use always_abort=True to slightly simplify wait_all_tasks_blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
njsmith committed Jul 30, 2018
1 parent 6553bbc commit 3bf8564
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions trio/_core/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3bf8564

Please sign in to comment.