mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
GH-105684: Require asyncio.Task
implementations to support set_name
method (#105685)
This commit is contained in:
parent
829ac13b69
commit
840d02f3f0
5 changed files with 8 additions and 16 deletions
|
@ -163,7 +163,7 @@ class TaskGroup:
|
|||
task = self._loop.create_task(coro)
|
||||
else:
|
||||
task = self._loop.create_task(coro, context=context)
|
||||
tasks._set_task_name(task, name)
|
||||
task.set_name(name)
|
||||
# optimization: Immediately call the done callback if the task is
|
||||
# already done (e.g. if the coro was able to complete eagerly),
|
||||
# and skip scheduling a done callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue