Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-128550: TaskGroup: cancel tasks added to set after aborting
  • Loading branch information
graingert committed Jan 6, 2025
commit 9726c3d31f4290c164fd0f8a05e4c739817d7256
2 changes: 2 additions & 0 deletions Lib/asyncio/taskgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def create_task(self, coro, *, name=None, context=None):
else:
self._tasks.add(task)
task.add_done_callback(self._on_task_done)
if self._aborting:
Comment thread
graingert marked this conversation as resolved.
task.cancel()
return task

# Since Python 3.8 Tasks propagate all exceptions correctly,
Expand Down