summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-05-17 13:13:30 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-05-17 13:13:30 (GMT)
commitf7a661571945b02e4c3aa77f30a86a3244cb5d2b (patch)
tree7a4daa84491b4dec88de78e973ce6d4e92721fc6
parent9729fd442730375e88a91896a162afd667283154 (diff)
downloadcpython-f7a661571945b02e4c3aa77f30a86a3244cb5d2b.zip
cpython-f7a661571945b02e4c3aa77f30a86a3244cb5d2b.tar.gz
cpython-f7a661571945b02e4c3aa77f30a86a3244cb5d2b.tar.bz2
#14823: Simplify threading.Lock.acquire argument discussion.
-rw-r--r--Doc/library/threading.rst13
1 files changed, 5 insertions, 8 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 30f7ece..43087ef 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -403,15 +403,12 @@ All methods are executed atomically.
Acquire a lock, blocking or non-blocking.
- When invoked without arguments, block until the lock is unlocked, then set it to
- locked, and return true.
+ When invoked with the *blocking* argument set to ``True`` (the default),
+ 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
- called without arguments, 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.
+ When invoked with the *blocking* argument set to ``False``, do not block.
+ 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 floating-point *timeout* argument set to a positive
value, block for at most the number of seconds specified by *timeout*