]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116738: Make _heapq module thread-safe (#135036)
authorAlper <alperyoney@fb.com>
Mon, 9 Jun 2025 17:57:29 +0000 (10:57 -0700)
committerGitHub <noreply@github.com>
Mon, 9 Jun 2025 17:57:29 +0000 (10:57 -0700)
commita58026a5e3da9ca2d09ef51aa90fe217f9a975ec
tree2027878d9bed8e6aa16da2fcfe8e70a34a9efda5
parentcc8e6d27031dcf2582bd287b14ab9b6e200d5e92
gh-116738: Make _heapq module thread-safe (#135036)

Use critical sections to make heapq methods that update the heap thread-safe when the GIL is disabled.

---------

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