-
- Downloads
gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (GH-93222)
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 commit 24e03796) Co-authored-by:Cyker Way <cykerway@gmail.com>
Showing
- Lib/asyncio/locks.py 42 additions, 22 deletionsLib/asyncio/locks.py
- Lib/test/test_asyncio/test_locks.py 100 additions, 0 deletionsLib/test/test_asyncio/test_locks.py
- Misc/NEWS.d/next/Library/2022-05-25-15-57-39.gh-issue-90155.YMstB5.rst 1 addition, 0 deletions...ext/Library/2022-05-25-15-57-39.gh-issue-90155.YMstB5.rst
Loading
Please register or sign in to comment