[Python-checkins] cpython: asyncio doc: move AbstractServer to the event loop page
victor.stinner
python-checkins at python.org
Fri Jan 24 18:12:20 CET 2014
http://hg.python.org/cpython/rev/eca51c887c37
changeset: 88674:eca51c887c37
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Jan 24 18:11:43 2014 +0100
summary:
asyncio doc: move AbstractServer to the event loop page
Add also entries in the table of content for each synchronization primitive
class.
files:
Doc/library/asyncio-eventloop.rst | 16 +++++++++++
Doc/library/asyncio-protocol.rst | 16 -----------
Doc/library/asyncio-sync.rst | 27 +++++++++++++++++++
3 files changed, 43 insertions(+), 16 deletions(-)
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -344,6 +344,22 @@
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)
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -415,22 +415,6 @@
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
============================================
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -7,6 +7,9 @@
Locks
-----
+Lock
+^^^^
+
.. class:: Lock(\*, loop=None)
Primitive lock objects.
@@ -85,6 +88,9 @@
There is no return value.
+Event
+^^^^^
+
.. class:: Event(\*, loop=None)
An Event implementation, asynchronous equivalent to :class:`threading.Event`.
@@ -121,6 +127,9 @@
This method returns a :ref:`coroutine object <coroutine>`.
+Condition
+^^^^^^^^^
+
.. class:: Condition(\*, loop=None)
A Condition implementation, asynchronous equivalent to
@@ -181,6 +190,9 @@
Semaphores
----------
+Semaphore
+^^^^^^^^^
+
.. class:: Semaphore(value=1, \*, loop=None)
A Semaphore implementation.
@@ -218,6 +230,9 @@
larger than zero again, wake up that coroutine.
+BoundedSemaphore
+^^^^^^^^^^^^^^^^
+
.. class:: BoundedSemaphore(value=1, \*, loop=None)
A bounded semaphore implementation. Inherit from :class:`Semaphore`.
@@ -229,6 +244,9 @@
Queues
------
+Queue
+^^^^^
+
.. class:: Queue(maxsize=0, \*, loop=None)
A queue, useful for coordinating producer and consumer coroutines.
@@ -294,6 +312,9 @@
Number of items allowed in the queue.
+PriorityQueue
+^^^^^^^^^^^^^
+
.. class:: PriorityQueue
A subclass of :class:`Queue`; retrieves entries in priority order (lowest
@@ -302,12 +323,18 @@
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`
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list