Commit 1bddab7f authored by R David Murray's avatar R David Murray

#14823: Simplify threading.Lock.acquire argument discussion.

parent 6949392b
...@@ -401,15 +401,12 @@ All methods are executed atomically. ...@@ -401,15 +401,12 @@ All methods are executed atomically.
Acquire a lock, blocking or non-blocking. Acquire a lock, blocking or non-blocking.
When invoked without arguments, block until the lock is unlocked, then set it to When invoked with the *blocking* argument set to ``True`` (the default),
locked, and return true. block until the lock is unlocked, then set it to locked and return ``True``.
When invoked with the *blocking* argument set to true, do the same thing as when When invoked with the *blocking* argument set to ``False``, do not block.
called without arguments, and return true. If a call with *blocking* set to ``True`` would block, return ``False``
immediately; otherwise, set the lock to locked and return ``True``.
When invoked with the *blocking* argument set to false, do not block. If a call
without an argument would block, return false immediately; otherwise, do the
same thing as when called without arguments, and return true.
.. method:: Lock.release() .. method:: Lock.release()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment