Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-119344: Make critical section API public (GH-119353) #120856

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Jun 21, 2024

This makes the following macros public as part of the non-limited C-API for locking a single object or two objects at once.

  • Py_BEGIN_CRITICAL_SECTION(op) / Py_END_CRITICAL_SECTION()
  • Py_BEGIN_CRITICAL_SECTION2(a, b) / Py_END_CRITICAL_SECTION2()

The supporting functions and structs used by the macros are also exposed for cases where C macros are not available.
(cherry picked from commit 8f17d69)


📚 Documentation preview 📚: https://cpython-previews--120856.org.readthedocs.build/

…9353)

This makes the following macros public as part of the non-limited C-API for
locking a single object or two objects at once.

* `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()`
* `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()`

The supporting functions and structs used by the macros are also exposed for
cases where C macros are not available.
(cherry picked from commit 8f17d69)

Co-authored-by: Sam Gross <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant