[Python-checkins] cpython (3.4): asyncio doc: reformat event loop policy doc
victor.stinner
python-checkins at python.org
Fri Nov 28 17:46:19 CET 2014
https://hg.python.org/cpython/rev/c90fe355ac43
changeset: 93643:c90fe355ac43
branch: 3.4
parent: 93640:8dacb1a21793
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Nov 28 13:58:28 2014 +0100
summary:
asyncio doc: reformat event loop policy doc
files:
Doc/library/asyncio-eventloops.rst | 26 ++++++++++++-----
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/Doc/library/asyncio-eventloops.rst b/Doc/library/asyncio-eventloops.rst
--- a/Doc/library/asyncio-eventloops.rst
+++ b/Doc/library/asyncio-eventloops.rst
@@ -150,6 +150,7 @@
:func:`get_event_loop` and :func:`set_event_loop` provide convenient access to
event loops managed by the default policy.
+
Event loop policy interface
---------------------------
@@ -157,22 +158,31 @@
.. class:: AbstractEventLoopPolicy
+ Event loop policy.
+
.. method:: get_event_loop()
- Get the event loop for the current context. Returns an event loop object
- implementing the :class:`BaseEventLoop` interface, or raises an exception in case
- no event loop has been set for the current context and the current policy
- does not specify to create one. It should never return ``None``.
+ Get the event loop for the current context.
+
+ Returns an event loop object implementing the :class:`BaseEventLoop`
+ interface.
+
+ Raises an exception in case no event loop has been set for the current
+ context and the current policy does not specify to create one. It must
+ never return ``None``.
.. method:: set_event_loop(loop)
- Set the event loop for the current context to *loop*.
+ Set the event loop for the current context to *loop*.
.. method:: new_event_loop()
- Create and return a new event loop object according to this policy's rules.
- If there's need to set this loop as the event loop for the current context,
- :meth:`set_event_loop` must be called explicitly.
+ Create and return a new event loop object according to this policy's
+ rules.
+
+ If there's need to set this loop as the event loop for the current
+ context, :meth:`set_event_loop` must be called explicitly.
+
Access to the global loop policy
--------------------------------
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list