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

This commit is contained in:
R David Murray 2012-05-17 09:13:30 -04:00
parent 9729fd4427
commit f7a6615719
1 changed files with 5 additions and 8 deletions

View File

@ -403,15 +403,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.
When invoked with the floating-point *timeout* argument set to a positive When invoked with the floating-point *timeout* argument set to a positive
value, block for at most the number of seconds specified by *timeout* value, block for at most the number of seconds specified by *timeout*