Skip to content

gh-149225: Expose Py_CriticalSection in Stable ABI#149227

Open
encukou wants to merge 3 commits intopython:mainfrom
encukou:critical-section-stable-abi-xs
Open

gh-149225: Expose Py_CriticalSection in Stable ABI#149227
encukou wants to merge 3 commits intopython:mainfrom
encukou:critical-section-stable-abi-xs

Conversation

@encukou
Copy link
Copy Markdown
Member

@encukou encukou commented May 1, 2026

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 1, 2026

Documentation build overview

📚 cpython-previews | 🛠️ Build #32499032 | 📁 Comparing 7fe42f4 against main (f2c7c0d)

  🔍 Preview build  

7 files changed · ± 7 modified

± Modified

Comment thread Doc/c-api/synchronization.rst
@hugovk hugovk added the 3.15 new features, bugs and security fixes label May 1, 2026
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// Operations that need to lock two objects at once must use
// `Py_BEGIN_CRITICAL_SECTION2()`. You *CANNOT* use nested critical sections
// to lock more than one object at once, because the inner critical section
// may suspend the outer critical sections. This API does not provide a way
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// may suspend the outer critical sections. This API does not provide a way
// may suspend the outer critical sections. This API does not provide a way

@@ -0,0 +1,2 @@
:c:type:`PyCriticalSection` and related functions are added to the Stable
ABI.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you copy also this paragraph to What's New in Python 3.15 > C API changes > New features?

Comment thread Doc/c-api/synchronization.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.15 new features, bugs and security fixes awaiting merge release-blocker

Projects

Development

Successfully merging this pull request may close these issues.

4 participants