Message188781
Incorporated R. David Murray's feedback...
.. method:: acquire(blocking=True, timeout=-1)
Without any optional argument, this method acquires the lock
unconditionally, if necessary waiting until it is released by another
thread (only one thread at a time can acquire a lock).
If *blocking* is ``False``, the call returns immediately. If *blocking*
is ``True``, the lock is acquired unconditionally. In both cases
the return value indicates whether or not the lock was acquired.
If the floating-point *timeout* argument is present and positive, it
specifies the maximum wait time in seconds before returning; the return
value indicates whether or not the lock was acquired. A negative
*timeout* argument specifies an unbounded wait and is the same as not
specifying a *timeout* and also setting *blocking* to ``True``. A zero
*timeout* is the same as not specifying a *timeout* and setting *blocking*
to ``False``. You cannot specify a *timeout* if *blocking* is ``False``.
The return value is ``True`` if the lock is acquired successfully,
``False`` if not. |
|
Date |
User |
Action |
Args |
2013-05-09 15:19:20 | amysyk | set | recipients:
+ amysyk, georg.brandl, r.david.murray, docs@python |
2013-05-09 15:19:20 | amysyk | set | messageid: <1368112760.69.0.421852947371.issue17858@psf.upfronthosting.co.za> |
2013-05-09 15:19:20 | amysyk | link | issue17858 messages |
2013-05-09 15:19:20 | amysyk | create | |
|