summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/locks.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-97545: Make Semaphore run faster. (#97549)Cyker Way2022-09-261-21/+17
|
* gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (#93222)Cyker Way2022-09-221-22/+42
| | | | | | | | | 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.
* gh-84623: Remove unused imports in stdlib (#93773)Victor Stinner2022-06-131-1/+0
|
* bpo-43352: Add a Barrier object in asyncio lib (GH-24903)Duprat2022-03-251-2/+155
| | | | Co-authored-by: Yury Selivanov <yury@edgedb.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-45997: Fix asyncio.Semaphore re-acquiring order (GH-31910)Andrew Svetlov2022-03-221-6/+10
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* bpo-46796: Simplify handling of removed parameter "loop" in asyncio (GH-31431)Serhiy Storchaka2022-02-211-10/+6
|
* bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)Joongi Kim2021-10-101-2/+0
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42392: Improve removal of *loop* parameter in asyncio primitives (GH-23499)Yurii Karabas2020-11-251-10/+14
| | | | | | | | | | * Update code after merge review from 1st1 * Use a sentinel approach for loop parameter Remove unnecessary _get_running_loop patching * Use more clear function name (_verify_parameter_is_marker -> _verify_no_loop) * Add init method to _LoopBoundMixin to check that loop param wasn't used
* bpo-42392: Remove loop parameter form asyncio locks and Queue (#23420)Yurii Karabas2020-11-241-52/+17
| | | Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-34793: Drop old-style context managers in asyncio.locks (GH-17533)Andrew Svetlov2020-02-011-83/+0
|
* bpo-36373: Fix deprecation warnings (GH-15889)Andrew Svetlov2019-09-111-1/+1
| | | https://bugs.python.org/issue36373
* bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs ↵Emmanuel Arias2019-09-101-12/+29
| | | | | | | | | | | | | | | [locks] (GH-13920) This PR deprecate explicit loop parameters in all public asyncio APIs This issues is split to be easier to review. Third step: locks.py https://bugs.python.org/issue36373
* bpo-34767: Do not always create a collections.deque() in asyncio.Lock() ↵Zackery Spytz2019-06-051-2/+7
| | | | | (GH-13834) https://bugs.python.org/issue34767
* bpo-36921: Deprecate @coroutine for sake of async def (GH-13346)Andrew Svetlov2019-05-161-2/+6
| | | | | | The second attempt. Now deprecate `@coroutine` only, keep `yield from fut` as is. https://bugs.python.org/issue36921
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-111-3/+4
|
* bpo-32841: Fix cancellation in awaiting asyncio.Condition (#5665)Bar Harel2018-02-141-1/+5
|
* bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466)Bar Harel2018-02-021-10/+22
|
* bpo-32258: Replace 'yield from' to 'await' in asyncio docs (#4779)Andrew Svetlov2017-12-111-6/+13
| | | | | | * Replace 'yield from' to 'await' in asyncio docs * Fix docstrings
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-101-11/+10
|
* bpo-32253: Deprecate with statement and bare await for asyncio locks (GH-4764)Andrew Svetlov2017-12-091-0/+7
| | | | | * Add test for 'with (yield from lock)' * Deprecate with statement for asyncio locks * Document the deprecation
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-081-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Convert asyncio/tasks.py to async/await * Convert asyncio/queues.py to async/await * Convert asyncio/test_utils.py to async/await * Convert asyncio/base_subprocess.py to async/await * Convert asyncio/subprocess.py to async/await * Convert asyncio/streams.py to async/await * Fix comments * Convert asyncio/locks.py to async/await * Convert asyncio.sleep to async def * Add a comment * Add missing news * Convert stubs from AbstrctEventLoop to async functions * Convert subprocess_shell/subprocess_exec * Convert connect_read_pipe/connect_write_pip to async/await syntax * Convert create_datagram_endpoint * Convert create_unix_server/create_unix_connection * Get rid of old style coroutines in unix_events.py * Convert selector_events.py to async/await * Convert wait_closed and create_connection * Drop redundant line * Convert base_events.py * Code cleanup * Drop redundant comments * Fix indentation * Add explicit tests for compatibility between old and new coroutines * Convert windows event loop to use async/await * Fix double awaiting of async function * Convert asyncio/locks.py * Improve docstring * Convert tests to async/await * Convert more tests * Convert more tests * Convert more tests * Convert tests * Improve test
* asyncio: Remove asyncio/compat.py (#4606)Victor Stinner2017-11-281-16/+13
| | | | | | | | | | The asyncio/compat.py file was written to support Python < 3.5 and Python < 3.5.2. But Python 3.5 doesn't accept bugfixes anymore, only security fixes. There is no more need to backport bugfixes to Python 3.5, and so no need to have a single code base for Python 3.5, 3.6 and 3.7. Say hello (again) to "async" and "await", who became real keywords in Python 3.7 ;-)
* Fix waiter cancellation in asyncio.Lock (#1031)Mathieu Sornay2017-06-091-5/+12
| | | | | | Avoid a deadlock when the waiter who is about to take the lock is cancelled Issue #27585
* In asyncio.locks.Lock.acquire(): Avoid deadlock when a cancelled future is ↵Guido van Rossum2016-08-231-1/+1
| | | | in self._waiters.
* Issue #22970: asyncio: Fix inconsistency cancelling Condition.wait.Yury Selivanov2016-06-111-1/+7
| | | | Patch by David Coles.
* Fix typos in code comment and documentationMartin Panter2016-06-041-1/+1
|
* Issue #27041: asyncio: Add loop.create_future methodYury Selivanov2016-05-161-4/+4
|
* Also rewrote the guts of asyncio.Semaphore (patch by manipopopo).Guido van Rossum2015-09-291-16/+21
|
* asyncio: sync with githubVictor Stinner2015-07-251-1/+0
| | | | | | | | | * Fix ResourceWarning warnings in test_streams * Return True from StreamReader.eof_received() to fix http://bugs.python.org/issue24539 (but still needs a unittest). Add StreamReader.__repr__() for easy debugging. * remove unused imports * Issue #234: Drop JoinableQueue on Python 3.5+
* asyncio: Add asyncio.compat moduleVictor Stinner2015-07-251-4/+2
| | | | | Move compatibility helpers for the different Python versions to a new asyncio.compat module.
* Sync asyncio code from default branch.Yury Selivanov2015-05-131-55/+53
|
* Issue #23456: Add missing @coroutine decorators in asyncioVictor Stinner2015-03-181-0/+3
|
* Issue #22369: Change "context manager protocol" to "context management ↵Serhiy Storchaka2014-09-101-2/+2
| | | | protocol".
* Accept optional lock object in Condition ctor (tulip issue #198)Andrew Svetlov2014-07-261-3/+6
|
* asyncio: sync with Tulip, add a new asyncio.coroutines moduleVictor Stinner2014-06-281-6/+6
|
* asyncio: Locks refactor: use a separate context manager; remove ↵Guido van Rossum2014-01-261-22/+60
| | | | Semaphore._locked.
* asyncio: Don't special-case GeneratorExit in Condition.wait().Guido van Rossum2014-01-101-6/+1
|
* Shorten lines.Guido van Rossum2013-12-191-2/+2
|
* asyncio: replace our with asynchronous in docstringVictor Stinner2013-12-021-1/+1
|
* asyncio: document locksVictor Stinner2013-12-021-3/+3
|
* asyncio: Add BoundedSemaphore to export list in locks.__all__.Guido van Rossum2013-11-251-1/+1
|
* asyncio: Change bounded semaphore into a subclass, like ↵Guido van Rossum2013-11-231-17/+19
| | | | threading.[Bounded]Semaphore.
* asyncio: Make Semaphore(0) work properly.Guido van Rossum2013-11-211-2/+2
|
* asyncio: Locks improvements by Arnaud Faure: better repr(), change Conditio\Guido van Rossum2013-11-041-24/+54
| | | | n structure.
* Initial checkin of asyncio package (== Tulip, == PEP 3156).Guido van Rossum2013-10-171-0/+401