diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-05-17 13:15:02 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-05-17 13:15:02 (GMT) |
commit | 1bddab7f0c01c70d2102d93c14d3164ed5ce1f10 (patch) | |
tree | becd915fb342b27da3532f00090a5af238ced566 | |
parent | 6949392b56e5bb386c1157fc8d337a67647c9248 (diff) | |
download | cpython-1bddab7f0c01c70d2102d93c14d3164ed5ce1f10.zip cpython-1bddab7f0c01c70d2102d93c14d3164ed5ce1f10.tar.gz cpython-1bddab7f0c01c70d2102d93c14d3164ed5ce1f10.tar.bz2 |
#14823: Simplify threading.Lock.acquire argument discussion.
-rw-r--r-- | Doc/library/threading.rst | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 89434b6..44e4d6d 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -401,15 +401,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``. .. method:: Lock.release() |