Kaydet (Commit) 921879ab authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #1209880] Describe only the True/False return values from lock.acquire()

üst 6a15c5d0
...@@ -81,11 +81,11 @@ Lock objects have the following methods: ...@@ -81,11 +81,11 @@ Lock objects have the following methods:
Without the optional argument, this method acquires the lock Without the optional argument, this method acquires the lock
unconditionally, if necessary waiting until it is released by another unconditionally, if necessary waiting until it is released by another
thread (only one thread at a time can acquire a lock --- that's their thread (only one thread at a time can acquire a lock --- that's their
reason for existence), and returns \code{None}. If the integer reason for existence). If the integer
\var{waitflag} argument is present, the action depends on its \var{waitflag} argument is present, the action depends on its
value: if it is zero, the lock is only acquired if it can be acquired value: if it is zero, the lock is only acquired if it can be acquired
immediately without waiting, while if it is nonzero, the lock is immediately without waiting, while if it is nonzero, the lock is
acquired unconditionally as before. If an argument is present, the acquired unconditionally as before. The
return value is \code{True} if the lock is acquired successfully, return value is \code{True} if the lock is acquired successfully,
\code{False} if not. \code{False} if not.
\end{methoddesc} \end{methoddesc}
......
...@@ -167,8 +167,7 @@ All methods are executed atomically. ...@@ -167,8 +167,7 @@ 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 When invoked without arguments, block until the lock is
unlocked, then set it to locked, and return. There is no unlocked, then set it to locked, and return true.
return value in this case.
When invoked with the \var{blocking} argument set to true, do the When invoked with the \var{blocking} argument set to true, do the
same thing as when called without arguments, and return true. same thing as when called without arguments, and return true.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment