summaryrefslogtreecommitdiff
path: root/Doc/library
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-05-17 09:14:28 -0400
committerR David Murray <rdmurray@bitdance.com>2012-05-17 09:14:28 -0400
commit1c29e3a32cc8f17b563f41419df7d7f9ec286894 (patch)
treee51eb6e14b3363b6a15e7fe964ae6faf26aab6e3 /Doc/library
parent2a608170ebdc57d4e4ad13999954fef6d594dc30 (diff)
parent4b13fb98ae82788f988bb88e72466c8267a97171 (diff)
downloadcpython-1c29e3a32cc8f17b563f41419df7d7f9ec286894.tar.gz
#14823: Simplify threading.Lock.acquire argument discussion.
Diffstat (limited to 'Doc/library')
-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 42dbc01c00..613f304dea 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -426,15 +426,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*