]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112050: Make collections.deque thread-safe in free-threaded builds (#113830)
authormpage <mpage@meta.com>
Thu, 15 Feb 2024 08:22:47 +0000 (00:22 -0800)
committerGitHub <noreply@github.com>
Thu, 15 Feb 2024 08:22:47 +0000 (09:22 +0100)
commitdc978f6ab62b68c66d3b354638c310ee1cc844a6
tree06e7ebe6f6f5526919aae14163ba87236cb72407
parent474204765bdbdd4bc84a8ba49d3a6558e9e4e3fd
gh-112050: Make collections.deque thread-safe in free-threaded builds (#113830)

Use critical sections to make deque methods that operate on mutable
state thread-safe when the GIL is disabled. This is mostly accomplished
by using the @critical_section Argument Clinic directive, though there
are a few places where this was not possible and critical sections had
to be manually acquired/released.
Include/internal/pycore_pyatomic_ft_wrappers.h
Misc/NEWS.d/next/Core and Builtins/2024-01-08-21-57-41.gh-issue-112050.qwgjx1.rst [new file with mode: 0644]
Modules/_collectionsmodule.c
Modules/clinic/_collectionsmodule.c.h