]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-116738: Make _heapq module thread-safe (GH-135036) (gh-135309)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 16 Jun 2025 17:27:43 +0000 (19:27 +0200)
committerGitHub <noreply@github.com>
Mon, 16 Jun 2025 17:27:43 +0000 (13:27 -0400)
commit964c29d28137bc9cd4ad011c1da8bc5ca127eaa3
tree000c7ae1702b14b086c854a48c747186f6775fd6
parent15f7bd4295533c6debe3a5a898de7dcf97abc138
[3.14] gh-116738: Make _heapq module thread-safe (GH-135036) (gh-135309)

Use critical sections to make heapq methods that update the heap thread-safe when the GIL is disabled.
(cherry picked from commit a58026a5e3da9ca2d09ef51aa90fe217f9a975ec)

Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: mpage <mpage@meta.com>
Lib/test/test_free_threading/test_heapq.py [new file with mode: 0644]
Misc/NEWS.d/next/Core_and_Builtins/2025-06-02-13-57-40.gh-issue-116738.ycJsL8.rst [new file with mode: 0644]
Modules/_heapqmodule.c
Modules/clinic/_heapqmodule.c.h