mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.13] gh-128308: pass **kwargs
to asyncio task_factory (GH-128768) (#130084)
* [3.13] gh-128308: pass `**kwargs` to asyncio task_factory (GH-128768)
(cherry picked from commit 38a9956876
)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
---------
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
9e23e0ad2c
commit
7b0543ebe6
7 changed files with 40 additions and 21 deletions
|
@ -382,9 +382,9 @@ Creating Futures and Tasks
|
|||
|
||||
If *factory* is ``None`` the default task factory will be set.
|
||||
Otherwise, *factory* must be a *callable* with the signature matching
|
||||
``(loop, coro, context=None)``, where *loop* is a reference to the active
|
||||
``(loop, coro, **kwargs)``, where *loop* is a reference to the active
|
||||
event loop, and *coro* is a coroutine object. The callable
|
||||
must return a :class:`asyncio.Future`-compatible object.
|
||||
must pass on all *kwargs*, and return a :class:`asyncio.Task`-compatible object.
|
||||
|
||||
.. method:: loop.get_task_factory()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue