diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-29 23:37:22 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-29 23:37:22 (GMT) |
commit | ff5d085fde309dcbcce0e9ac3433fa8d0fb364ae (patch) | |
tree | ad141d8125ae1d1fd57fecfbb4c92aea2b572dd4 /Doc/library | |
parent | 49b74d1a91e3bcfe26c34e12b209b460fda8354c (diff) | |
parent | 7a55b88d9cf55539d28e2aac6ced20c780984158 (diff) | |
download | cpython-ff5d085fde309dcbcce0e9ac3433fa8d0fb364ae.zip cpython-ff5d085fde309dcbcce0e9ac3433fa8d0fb364ae.tar.gz cpython-ff5d085fde309dcbcce0e9ac3433fa8d0fb364ae.tar.bz2 |
Merge 3.4 (asyncio doc)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-sync.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst index c63447b..4cc9a96 100644 --- a/Doc/library/asyncio-sync.rst +++ b/Doc/library/asyncio-sync.rst @@ -4,6 +4,29 @@ Synchronization primitives ========================== +Locks: + +* :class:`Lock` +* :class:`Event` +* :class:`Condition` +* :class:`Semaphore` +* :class:`BoundedSemaphore` + +Queues: + +* :class:`Queue` +* :class:`PriorityQueue` +* :class:`LifoQueue` +* :class:`JoinableQueue` + +asyncio locks and queues API were designed to be close to classes of the +:mod:`threading` module (:class:`~threading.Lock`, :class:`~threading.Event`, +:class:`~threading.Condition`, :class:`~threading.Semaphore`, +:class:`~threading.BoundedSemaphore`) and the :mod:`queue` module +(:class:`~queue.Queue`, :class:`~queue.PriorityQueue`, +:class:`~queue.LifoQueue`), but they have no *timeout* parameter. The +:func:`asyncio.wait_for` function can be used to cancel a task after a timeout. + Locks ----- |