]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-94398: TaskGroup: Fail create_task() during shutdown (GH-94400) (GH-94463)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 30 Jun 2022 18:02:42 +0000 (11:02 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Jun 2022 18:02:42 +0000 (20:02 +0200)
commit7fe949e5eac3efa8bb0cd9e7274380a044a408ea
tree8f69cacdca1e35f2eccc48cbde6dfe7c1ffa5b1b
parentaed28b7feb349cdeb45285d46ae7b36f200c957e
GH-94398: TaskGroup: Fail create_task() during shutdown (GH-94400) (GH-94463)

Once the task group is shutting down, it should not be possible to create a new task.
Here "shutting down" means `self._aborting` is set, indicating that at least one task
has failed and we have cancelled all others.

Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
(cherry picked from commit 594c3699492bfb007650538726d953cbed55de04)

Co-authored-by: Guido van Rossum <guido@python.org>
Doc/library/asyncio-task.rst
Lib/asyncio/taskgroups.py
Lib/test/test_asyncio/test_taskgroups.py
Misc/NEWS.d/next/Library/2022-06-29-04-42-56.gh-issue-94398.YOq_bJ.rst [new file with mode: 0644]