diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-05-17 13:14:28 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-05-17 13:14:28 (GMT) |
commit | dd95974509748fb8ae5077f9763c5d14d83ca414 (patch) | |
tree | e86d3715a4c2afb81e8d08ec258ba4c5cb09ebaf /Doc/library/threading.rst | |
parent | f398a94818b8e92ca6715807266d5c1d04ca5400 (diff) | |
parent | f7a661571945b02e4c3aa77f30a86a3244cb5d2b (diff) | |
download | cpython-dd95974509748fb8ae5077f9763c5d14d83ca414.zip cpython-dd95974509748fb8ae5077f9763c5d14d83ca414.tar.gz cpython-dd95974509748fb8ae5077f9763c5d14d83ca414.tar.bz2 |
#14823: Simplify threading.Lock.acquire argument discussion.
Diffstat (limited to 'Doc/library/threading.rst')
-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 42dbc01..613f304 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* |