@@ -238,18 +238,31 @@ Creating Tasks
238238
239239-----------------------------------------------
240240
241- .. function :: create_task(coro, *, name=None, context=None)
241+ .. function :: create_task(coro, *, name=None, context=None, eager_start=None, **kwargs )
242242
243243 Wrap the *coro * :ref: `coroutine <coroutine >` into a :class: `Task `
244244 and schedule its execution. Return the Task object.
245245
246+ The arguments shown above are merely the most common ones, described below
247+ The full function signature is largely the same as that of the
248+ :class: `Task ` constructor (or factory) - all of the keyword arguments to
249+ this function are passed through to that interface, except *name *,
250+ or *context * if it is ``None ``.
251+
246252 If *name * is not ``None ``, it is set as the name of the task using
247253 :meth: `Task.set_name `.
248254
249255 An optional keyword-only *context * argument allows specifying a
250256 custom :class: `contextvars.Context ` for the *coro * to run in.
251257 The current context copy is created when no *context * is provided.
252258
259+ An optional keyword-only *eager_start * argument allows eagerly starting
260+ the execution of the :class: `asyncio.Task ` at task creation time.
261+ If set to ``True `` and the event loop is running, the task will start
262+ executing the coroutine immediately, until the first time the coroutine
263+ blocks. If the coroutine returns or raises without blocking, the task
264+ will be finished eagerly and will skip scheduling to the event loop.
265+
253266 The task is executed in the loop returned by :func: `get_running_loop `,
254267 :exc: `RuntimeError ` is raised if there is no running loop in
255268 current thread.
@@ -290,6 +303,14 @@ Creating Tasks
290303 .. versionchanged :: 3.11
291304 Added the *context * parameter.
292305
306+ .. versionchanged :: 3.13.3
307+ Added ``kwargs `` which always passes on ``kwargs `` such as the *eager_start *
308+ parameter and *name * parameter.
309+
310+ .. versionchanged :: 3.13.4
311+ Rolled back the change that passes on *name * and *context * (if it is None),
312+ passing on new keword arguments such as *eager_start * is still supported.
313+
293314
294315Task Cancellation
295316=================
@@ -330,10 +351,10 @@ and reliable way to wait for all tasks in the group to finish.
330351
331352 .. versionadded :: 3.11
332353
333- .. method :: create_task(coro, *, name=None, context=None)
354+ .. method :: create_task(coro, *, name=None, context=None, eager_start=None, **kwargs )
334355
335356 Create a task in this task group.
336- The signature matches that of :func: ` asyncio .create_task `.
357+ The signature matches that of :meth: ` loop .create_task `.
337358 If the task group is inactive (e.g. not yet entered,
338359 already finished, or in the process of shutting down),
339360 we will close the given ``coro ``.
@@ -342,6 +363,10 @@ and reliable way to wait for all tasks in the group to finish.
342363
343364 Close the given coroutine if the task group is not active.
344365
366+ .. versionchanged :: 3.13.3
367+
368+ Passes on all keyword arguments to :meth: `loop.create_task `
369+
345370Example::
346371
347372 async def main():
0 commit comments