cpython/Lib/asyncio
Miss Islington (bot) 773dbb9e3a
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 24e0379624)

Co-authored-by: Cyker Way <cykerway@gmail.com>
2022-09-22 09:58:35 -07:00
..
__init__.py bpo-46771: Implement asyncio context managers for handling timeouts (GH-31394) 2022-03-10 08:05:20 -08:00
__main__.py bpo-37028: asyncio REPL; activated via 'python -m asyncio'. (GH-13472) 2019-05-27 13:42:29 +02:00
base_events.py Fix missing f prefix on f-strings (GH-91910) 2022-04-27 09:30:54 +03:00
base_futures.py bpo-47039: Normalize repr() of asyncio future and task objects (GH-31950) 2022-03-17 03:03:09 +02:00
base_subprocess.py bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528) 2019-05-27 14:45:12 +02:00
base_tasks.py bpo-47039: Normalize repr() of asyncio future and task objects (GH-31950) 2022-03-17 03:03:09 +02:00
constants.py bpo-44011: New asyncio ssl implementation (#31275) 2022-02-15 15:04:00 +02:00
coroutines.py bpo-43216: Remove @asyncio.coroutine (GH-26369) 2021-07-01 15:13:59 +02:00
events.py bpo-46994: Accept explicit contextvars.Context in asyncio create_task() API (GH-31837) 2022-03-14 13:54:13 +02:00
exceptions.py bpo-43352: Add a Barrier object in asyncio lib (GH-24903) 2022-03-26 00:01:21 +02:00
format_helpers.py bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7161) 2018-05-28 16:27:34 -04:00
futures.py [3.11] bpo-45924: Fix asyncio incorrect traceback when future's exception is raised multiple times (GH-30274) (#94747) 2022-07-11 14:17:32 +01:00
locks.py gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (GH-93222) 2022-09-22 09:58:35 -07:00
log.py
mixins.py bpo-46796: Simplify handling of removed parameter "loop" in asyncio (GH-31431) 2022-02-21 13:25:52 +02:00
proactor_events.py gh-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842) 2022-05-17 15:59:29 -07:00
protocols.py bpo-46741: Update asyncio.protocols.BufferedProtocol docstring (31327) 2022-02-15 18:39:28 +02:00
queues.py bpo-46796: Simplify handling of removed parameter "loop" in asyncio (GH-31431) 2022-02-21 13:25:52 +02:00
runners.py GH-95899: fix asyncio.Runner to call set_event_loop only once (GH-95900) (#96003) 2022-08-15 15:01:23 -07:00
selector_events.py gh-91487: Optimize asyncio UDP speed (GH-91488) 2022-04-15 12:59:01 -07:00
sslproto.py Remove trailing spaces (GH-31695) 2022-03-05 17:47:00 +02:00
staggered.py Fix import path for asyncio.TimeoutError (#17691) 2019-12-24 12:46:42 +02:00
streams.py GH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705) (#96395) 2022-08-30 12:00:21 +01:00
subprocess.py bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess (GH-23521) 2020-11-28 10:21:17 +02:00
taskgroups.py GH-95704: Don't suppress errors from tasks when TG is cancelled (GH-95761) 2022-08-17 10:04:59 -07:00
tasks.py gh-94972: document that shield users need to keep a reference to their task (GH-96724) 2022-09-10 08:03:35 -07:00
threads.py Trivial typo in docstring 2021-07-31 06:36:10 +02:00
timeouts.py gh-95051: ensure that timeouts scheduled with asyncio.Timeout that have already expired are deliverered promptly (GH-95109) (GH-95216) 2022-07-26 12:16:12 +02:00
transports.py Remove trailing spaces (GH-31695) 2022-03-05 17:47:00 +02:00
trsock.py bpo-43232: Remove previously deprecated methods on TransportSocket (GH-24538) 2021-06-30 09:19:09 +03:00
unix_events.py bpo-44011: New asyncio ssl implementation (#31275) 2022-02-15 15:04:00 +02:00
windows_events.py bpo-46805: Add low level UDP socket functions to asyncio (GH-31455) 2022-03-13 18:42:29 +02:00
windows_utils.py asyncio: __del__() keep reference to warnings.warn (GH-11491) 2019-01-10 11:24:40 +01:00