threading primitives now have timeouts
This commit is contained in:
parent
992ca5278e
commit
f51ebf94bb
|
@ -876,14 +876,6 @@ object -- see :ref:`multiprocessing-managers`.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The :meth:`acquire` method of :class:`BoundedSemaphore`, :class:`Lock`,
|
|
||||||
:class:`RLock` and :class:`Semaphore` has a timeout parameter not supported
|
|
||||||
by the equivalents in :mod:`threading`. The signature is
|
|
||||||
``acquire(block=True, timeout=None)`` with keyword parameters being
|
|
||||||
acceptable. If *block* is ``True`` and *timeout* is not ``None`` then it
|
|
||||||
specifies a timeout in seconds. If *block* is ``False`` then *timeout* is
|
|
||||||
ignored.
|
|
||||||
|
|
||||||
On Mac OS X, ``sem_timedwait`` is unsupported, so calling ``acquire()`` with
|
On Mac OS X, ``sem_timedwait`` is unsupported, so calling ``acquire()`` with
|
||||||
a timeout will emulate that function's behavior using a sleeping loop.
|
a timeout will emulate that function's behavior using a sleeping loop.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue