Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Jan 4, 2025
1 parent dd55eae commit 9fc105f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/asyncio/staggered.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def task_done(task):
and not on_completed_fut.done()
and not running_tasks
):
on_completed_fut.set_result(True)
on_completed_fut.set_result(None)

if task.cancelled():
return
Expand Down Expand Up @@ -110,7 +110,7 @@ async def run_one_coro(ok_to_start, previous_failed) -> None:
next_task = loop.create_task(run_one_coro(next_ok_to_start, this_failed))
running_tasks.add(next_task)
next_task.add_done_callback(task_done)
# next_task has been appended to running_tasks so next_task is ok to
# next_task has been appended to running_tasks so next_task is ok to
# start.
next_ok_to_start.set()
# Prepare place to put this coroutine's exceptions if not won
Expand Down Expand Up @@ -166,7 +166,7 @@ async def run_one_coro(ok_to_start, previous_failed) -> None:
if __debug__ and unhandled_exceptions:
# If run_one_coro raises an unhandled exception, it's probably a
# programming error, and I want to see it.
raise ExceptionGroup("multiple errors in staggered race", unhandled_exceptions)
raise ExceptionGroup("staggered race failed", unhandled_exceptions)
if propagate_cancellation_error is not None:
raise propagate_cancellation_error
return winner_result, winner_index, exceptions
Expand Down

0 comments on commit 9fc105f

Please sign in to comment.