Set the default executor used by :meth:`run_in_executor`.
+Server
+------
+
+.. class:: AbstractServer
+
+ Abstract server returned by :func:`BaseEventLoop.create_server`.
+
+ .. method:: close()
+
+ Stop serving. This leaves existing connections open.
+
+ .. method:: wait_closed()
+
+ Coroutine to wait until service is closed.
+
+
.. _asyncio-hello-world-callback:
Example: Hello World (callback)
coroutine can be used to wait until the write buffer is flushed.
-Server
-------
-
-.. class:: AbstractServer
-
- Abstract server returned by :func:`BaseEventLoop.create_server`.
-
- .. method:: close()
-
- Stop serving. This leaves existing connections open.
-
- .. method:: wait_closed()
-
- Coroutine to wait until service is closed.
-
-
Protocol example: TCP echo server and client
============================================
Locks
-----
+Lock
+^^^^
+
.. class:: Lock(\*, loop=None)
Primitive lock objects.
There is no return value.
+Event
+^^^^^
+
.. class:: Event(\*, loop=None)
An Event implementation, asynchronous equivalent to :class:`threading.Event`.
This method returns a :ref:`coroutine object <coroutine>`.
+Condition
+^^^^^^^^^
+
.. class:: Condition(\*, loop=None)
A Condition implementation, asynchronous equivalent to
Semaphores
----------
+Semaphore
+^^^^^^^^^
+
.. class:: Semaphore(value=1, \*, loop=None)
A Semaphore implementation.
larger than zero again, wake up that coroutine.
+BoundedSemaphore
+^^^^^^^^^^^^^^^^
+
.. class:: BoundedSemaphore(value=1, \*, loop=None)
A bounded semaphore implementation. Inherit from :class:`Semaphore`.
Queues
------
+Queue
+^^^^^
+
.. class:: Queue(maxsize=0, \*, loop=None)
A queue, useful for coordinating producer and consumer coroutines.
Number of items allowed in the queue.
+PriorityQueue
+^^^^^^^^^^^^^
+
.. class:: PriorityQueue
A subclass of :class:`Queue`; retrieves entries in priority order (lowest
Entries are typically tuples of the form: (priority number, data).
+LifoQueue
+^^^^^^^^^
+
.. class:: LifoQueue
A subclass of :class:`Queue` that retrieves most recently added entries
first.
+JoinableQueue
+^^^^^^^^^^^^^
+
.. class:: JoinableQueue
A subclass of :class:`Queue` with :meth:`task_done` and :meth:`join`