There was an error while loading. Please reload this page.
1 parent 5d87ec2 commit 7185461Copy full SHA for 7185461
1 file changed
Doc/library/asyncio-eventloop.rst
@@ -181,6 +181,26 @@ Coroutines
181
182
.. versionadded:: 3.4.2
183
184
+.. method:: BaseEventLoop.set_task_factory(factory)
185
+
186
+ Set a task factory that will be used by
187
+ :meth:`BaseEventLoop.create_task`.
188
189
+ If *factory* is ``None`` the default task factory will be set.
190
191
+ If *factory* is a *callable*, it should have a signature matching
192
+ ``(loop, coro)``, where *loop* will be a reference to the active
193
+ event loop, *coro* will be a coroutine object. The callable
194
+ must return an :class:`asyncio.Future` compatible object.
195
196
+ .. versionadded:: 3.4.4
197
198
+.. method:: BaseEventLoop.get_task_factory()
199
200
+ Return a task factory, or ``None`` if the default one is in use.
201
202
203
204
205
Creating connections
206
--------------------
0 commit comments