summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-eventloop.rst
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-11 20:28:27 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-05-11 20:28:27 (GMT)
commit71854618973f112b54a620cc565cf0bda8e1508a (patch)
tree3534d31e679ff8d34635f80c2e39f8d0ee01d43e /Doc/library/asyncio-eventloop.rst
parent5d87ec256bae0fa279d5640f04ffd3a1e14a91d8 (diff)
downloadcpython-71854618973f112b54a620cc565cf0bda8e1508a.zip
cpython-71854618973f112b54a620cc565cf0bda8e1508a.tar.gz
cpython-71854618973f112b54a620cc565cf0bda8e1508a.tar.bz2
docs/asyncio: Document set_task_factory/get_task_factory
Diffstat (limited to 'Doc/library/asyncio-eventloop.rst')
-rw-r--r--Doc/library/asyncio-eventloop.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index d27eb4b..e1a9da1 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -181,6 +181,26 @@ Coroutines
.. versionadded:: 3.4.2
+.. method:: BaseEventLoop.set_task_factory(factory)
+
+ Set a task factory that will be used by
+ :meth:`BaseEventLoop.create_task`.
+
+ If *factory* is ``None`` the default task factory will be set.
+
+ If *factory* is a *callable*, it should have a signature matching
+ ``(loop, coro)``, where *loop* will be a reference to the active
+ event loop, *coro* will be a coroutine object. The callable
+ must return an :class:`asyncio.Future` compatible object.
+
+ .. versionadded:: 3.4.4
+
+.. method:: BaseEventLoop.get_task_factory()
+
+ Return a task factory, or ``None`` if the default one is in use.
+
+ .. versionadded:: 3.4.4
+
Creating connections
--------------------