Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
[3.11] gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (GH-93222)#97019
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…antee (pythonGH-93222)The main problem was that an unluckily timed task cancellation could causethe semaphore to be stuck. There were also doubts about strict FIFO orderingof tasks allowed to pass.The Semaphore implementation was rewritten to be more similar to Lock.Many tests for edge cases (including cancellation) were added.(cherry picked from commit24e0379)Co-authored-by: Cyker Way <cykerway@gmail.com>
gvanrossum left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@pablogsal I'm not sure whether this ought to go into 3.11.0 or 3.11.1. The cancel-related bug was introduced in March 2022 and backported all the way to 3.9. But it's a lot of code to disturb a release candidate with.
miss-islington commentedSep 22, 2022
Status check is done, and it's a success ✅. |
Uh oh!
There was an error while loading.Please reload this page.
The main problem was that an unluckily timed task cancellation could cause
the semaphore to be stuck. There were also doubts about strict FIFO ordering
of tasks allowed to pass.
The Semaphore implementation was rewritten to be more similar to Lock.
Many tests for edge cases (including cancellation) were added.
(cherry picked from commit24e0379)
Co-authored-by: Cyker Waycykerway@gmail.com