Skip to content

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

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

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]>
@colesbury colesbury requested review from a team, markshannon and methane as code owners June 21, 2024 19:55
@colesbury colesbury enabled auto-merge (squash) June 21, 2024 19:57
@colesbury colesbury merged commit 4dc27bc into python:3.13 Jun 21, 2024
38 checks passed
@colesbury colesbury deleted the backport-8f17d69-3.13 branch June 21, 2024 21:15
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