changeset: 77011:251463919f3c branch: 2.7 parent: 77003:ff52583a5576 user: R David Murray date: Thu May 17 09:15:02 2012 -0400 files: Doc/library/threading.rst description: #14823: Simplify threading.Lock.acquire argument discussion. diff -r ff52583a5576 -r 251463919f3c Doc/library/threading.rst --- a/Doc/library/threading.rst Wed May 16 14:01:03 2012 -0400 +++ b/Doc/library/threading.rst Thu May 17 09:15:02 2012 -0400 @@ -401,15 +401,12 @@ 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()

AltStyle によって変換されたページ (->オリジナル) /