]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-139894: fix incorrect sharing of current task while forking in `asyncio` (#139897)
authorKumar Aditya <kumaraditya@python.org>
Fri, 10 Oct 2025 16:28:23 +0000 (21:58 +0530)
committerGitHub <noreply@github.com>
Fri, 10 Oct 2025 16:28:23 +0000 (21:58 +0530)
commitb881df47ff1adca515d1de04f689160ddae72142
tree0c9135cd422d9b5c8ed7fc0e15ae3b6b17352944
parentc7f1da97eb4639a17fb01ef122155bab2f262a34
gh-139894: fix incorrect sharing of current task while forking in `asyncio`  (#139897)

Fix incorrect sharing of current task with the forked child process by clearing thread state's current task and current loop in `PyOS_AfterFork_Child`.
Lib/test/test_asyncio/test_unix_events.py
Misc/NEWS.d/next/Library/2025-10-10-11-22-50.gh-issue-139894.ECAXqj.rst [new file with mode: 0644]
Modules/posixmodule.c