diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2018-08-08 21:06:47 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2018-08-08 21:06:47 (GMT) |
commit | cca4eec3c0a67cbfeaf09182ea6c097a94891ff6 (patch) | |
tree | 0d04ad10797fa95e5e09f8b32e8aa9e0c50f6aac /Doc/library/asyncio-eventloop.rst | |
parent | 52dee687af3671a31f63d6432de0d9ef370fd7b0 (diff) | |
download | cpython-cca4eec3c0a67cbfeaf09182ea6c097a94891ff6.zip cpython-cca4eec3c0a67cbfeaf09182ea6c097a94891ff6.tar.gz cpython-cca4eec3c0a67cbfeaf09182ea6c097a94891ff6.tar.bz2 |
bpo-34270: Make it possible to name asyncio tasks (GH-8547)
Co-authored-by: Antti Haapala <antti.haapala@anttipatterns.com>
Diffstat (limited to 'Doc/library/asyncio-eventloop.rst')
-rw-r--r-- | Doc/library/asyncio-eventloop.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 5b3d29d..1006853 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -246,7 +246,7 @@ Futures Tasks ----- -.. method:: AbstractEventLoop.create_task(coro) +.. method:: AbstractEventLoop.create_task(coro, \*, name=None) Schedule the execution of a :ref:`coroutine object <coroutine>`: wrap it in a future. Return a :class:`Task` object. @@ -255,8 +255,14 @@ Tasks interoperability. In this case, the result type is a subclass of :class:`Task`. + If the *name* argument is provided and not ``None``, it is set as the name + of the task using :meth:`Task.set_name`. + .. versionadded:: 3.4.2 + .. versionchanged:: 3.8 + Added the ``name`` parameter. + .. method:: AbstractEventLoop.set_task_factory(factory) Set a task factory that will be used by |