mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-36794: Document that Lock.acquire is fair. (GH-13082)
https://bugs.python.org/issue36794
This commit is contained in:
parent
46ed90dd01
commit
34f4f5efea
1 changed files with 7 additions and 0 deletions
|
@ -66,6 +66,13 @@ Lock
|
|||
This method waits until the lock is *unlocked*, sets it to
|
||||
*locked* and returns ``True``.
|
||||
|
||||
When more than one coroutine is blocked in :meth:`acquire`
|
||||
waiting for the lock to be unlocked, only one coroutine
|
||||
eventually proceeds.
|
||||
|
||||
Acquiring a lock is *fair*: the coroutine that proceeds will be
|
||||
the first coroutine that started waiting on the lock.
|
||||
|
||||
.. method:: release()
|
||||
|
||||
Release the lock.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue