]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116664: Make module state Py_SETREF's in _warnings thread-safe (#116959)
authorErlend E. Aasland <erlend@python.org>
Thu, 28 Mar 2024 15:05:08 +0000 (16:05 +0100)
committerGitHub <noreply@github.com>
Thu, 28 Mar 2024 15:05:08 +0000 (15:05 +0000)
commitc1712ef066321c01bf09cba3f22fc474b5b8dfa7
tree5670e3fcb8ba014051f0fc7c70360e76f9d7e054
parent9a388b9a64927c372d85f0eaec3de9b7320a6fb5
gh-116664: Make module state Py_SETREF's in _warnings thread-safe (#116959)

Mark the swap operations as critical sections.

Add an internal Py_BEGIN_CRITICAL_SECTION_MUT API that takes a PyMutex
pointer instead of a PyObject pointer.
Include/internal/pycore_critical_section.h
Include/internal/pycore_warnings.h
Python/_warnings.c