◐ Shell
clean mode source ↗

gh-115432: Add critical section variant that handles a NULL object by colesbury · Pull Request #115433 · python/cpython

This adds `Py_BEGIN_CRITICAL_SECTION_OPT` and
`Py_END_CRITICAL_SECTION_OPT`, which accept a possibly NULL object as an
argument. If the argument is NULL, then nothing is locked or unlocked.
Otherwise, they behave like `Py_BEGIN/END_CRITICAL_SECTION`.

@colesbury

tomasr8

diegorusso pushed a commit to diegorusso/cpython that referenced this pull request

Apr 17, 2024
…ect (python#115433)

This adds `Py_XBEGIN_CRITICAL_SECTION` and
`Py_XEND_CRITICAL_SECTION`, which accept a possibly NULL object as an
argument. If the argument is NULL, then nothing is locked or unlocked.
Otherwise, they behave like `Py_BEGIN/END_CRITICAL_SECTION`.

colesbury added a commit to colesbury/cpython that referenced this pull request

May 9, 2024

colesbury added a commit that referenced this pull request

May 9, 2024

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 9, 2024

colesbury added a commit that referenced this pull request

May 9, 2024

SonicField pushed a commit to SonicField/cpython that referenced this pull request

May 10, 2024

LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request

Jan 22, 2025
…ect (python#115433)

This adds `Py_XBEGIN_CRITICAL_SECTION` and
`Py_XEND_CRITICAL_SECTION`, which accept a possibly NULL object as an
argument. If the argument is NULL, then nothing is locked or unlocked.
Otherwise, they behave like `Py_BEGIN/END_CRITICAL_SECTION`.