mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
gh-119121: Fix and test async.staggered.staggered_race
(#119173)
This commit is contained in:
parent
357f5a1f73
commit
16b46ebd2b
3 changed files with 100 additions and 2 deletions
|
@ -69,8 +69,7 @@ async def staggered_race(coro_fns, delay, *, loop=None):
|
|||
exceptions = []
|
||||
running_tasks = []
|
||||
|
||||
async def run_one_coro(
|
||||
previous_failed: typing.Optional[locks.Event]) -> None:
|
||||
async def run_one_coro(previous_failed) -> None:
|
||||
# Wait for the previous task to finish, or for delay seconds
|
||||
if previous_failed is not None:
|
||||
with contextlib.suppress(exceptions_mod.TimeoutError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue