Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 25, 2024

Use a longer sleep for the "sleep2" task, 60 seconds instead of 2 seconds, to make sure that "sleep1" task (1 second) is more likely to win the race.

Use a longer sleep for the "sleep2" task, 60 seconds instead of 2
seconds, to make sure that "sleep1" task (1 second) is more likely to
win the race.
@1st1
Copy link
Member

1st1 commented Nov 25, 2024

Maybe just add 2 locks and use them to serialize things properly? Sleeps will never work reliably

@vstinner
Copy link
Member Author

Maybe just add 2 locks and use them to serialize things properly? Sleeps will never work reliably

I wrote PR gh-127358 which replaces sleep(2) with a task which is blocked forever. Is it better?

@vstinner
Copy link
Member Author

I merged #127358 instead. Thanks for review @1st1.

@vstinner vstinner closed this Nov 29, 2024
@vstinner vstinner deleted the asyncio_staggered branch November 29, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants