8000 gh-127258: Fix asyncio test_staggered_race_with_eager_tasks() by vstinner · Pull Request #127259 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-127258: Fix asyncio test_staggered_race_with_eager_tasks() #127259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

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
0