Skip to content

Hold a per-object mutex when modifying PyUpb_WeakMaps #23024

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lysnikolaou
Copy link

Because upb_inttable is not thread-safe, we need to hold a per-object mutex when calling into those APIs. This makes sure that's true, while also adding a very thin compatibility layer in python/python_api.h, so we don't have to wrap all the usages of the Py_BEGIN_CRITICAL_SECTION APIs in #ifdefs.

@lysnikolaou lysnikolaou requested a review from a team as a code owner August 6, 2025 18:18
@lysnikolaou lysnikolaou requested review from zhangskz and removed request for a team August 6, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants