]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-120974: Make _asyncio._enter_task atomic in the free-threaded build (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 23 Jul 2024 09:17:52 +0000 (11:17 +0200)
committerGitHub <noreply@github.com>
Tue, 23 Jul 2024 09:17:52 +0000 (09:17 +0000)
commit48154e705318f1ef800c48f39984ce5896a4ee47
treef1236a8a00eda331bb1873a78a0b705246257d00
parent4892cc072a18c0ef88ac7d2f57ab93736fe8704b
[3.13] gh-120974: Make _asyncio._enter_task atomic in the free-threaded build (GH-122138) (#122152)

gh-120974: Make _asyncio._enter_task atomic in the free-threaded build (GH-122138)

Use `PyDict_SetDefaultRef` to set the current task in a single operation
under the dictionary's lock.
(cherry picked from commit 47847aa8ef66837f984fc4e30187d88f8d8ab201)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Modules/_asynciomodule.c