Skip to content

gh-134009: Expose PyMutex_IsLocked in the public C API #134365

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 7 commits into from
Jul 1, 2025

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented May 20, 2025

The PyMutex_IsLocked() function is useful in assertions for verifying that code maintains certain locking invariants.


📚 Documentation preview 📚: https://cpython-previews--134365.org.readthedocs.build/en/134365/c-api/init.html#c.PyMutex_IsLocked

The `PyMutex_IsLocked()` function is useful in assertions for verifying
that code maintains certain locking invariants.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
@colesbury colesbury marked this pull request as ready for review June 24, 2025 20:02
@colesbury colesbury merged commit f41e9c7 into python:main Jul 1, 2025
46 checks passed
@colesbury colesbury deleted the gh-134009-pymutex-is-locked branch July 1, 2025 17:26
AndPuQing pushed a commit to AndPuQing/cpython that referenced this pull request Jul 11, 2025
…ngh-134365)

The `PyMutex_IsLocked()` function is useful in assertions for verifying
that code maintains certain locking invariants.
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…ngh-134365)

The `PyMutex_IsLocked()` function is useful in assertions for verifying
that code maintains certain locking invariants.
picnixz pushed a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
…ngh-134365)

The `PyMutex_IsLocked()` function is useful in assertions for verifying
that code maintains certain locking invariants.
@hugovk hugovk added the needs backport to 3.14 bugs and security fixes label Jul 22, 2025
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @colesbury, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f41e9c750e6971c165e055374a1014d6afd2d50e 3.14

hugovk pushed a commit to hugovk/cpython that referenced this pull request Jul 22, 2025
…pythongh-134365)

The `PyMutex_IsLocked()` function is useful in assertions for verifying
that code maintains certain locking invariants.
(cherry picked from commit f41e9c7)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 22, 2025

GH-136971 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jul 22, 2025
hugovk added a commit that referenced this pull request Jul 22, 2025
…34365) (#136971)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy