-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
unicode: make _PyUnicode_FromId
thread-safe in --disable-gil
builds
#111971
Comments
_PyUnicode_FromId
thread-safe in --disable-gil
builds_PyUnicode_FromId
thread-safe in --disable-gil
builds
@colesbury Can I take a look at this issue too? |
@corona10, sure. I think this requires some investigation to figure out what the right thing to do. From a quick glance, we've gotten rid of |
@colesbury
For sync our implementation strategy: |
Now we can close this issue |
Feature or enhancement
The
_PyUnicode_FromId(_Py_Identifier *id)
function gets a Pythonstr
object (i.e., aPyUnicodeObject
) from a static C string. Subsequent calls to_PyUnicode_FromId()
return the same object. The initialization is not currently thread-safe without the GIL.Mostly for my own reference, here is the implementation from
nogil-3.12
: colesbury/nogil-3.12@6540bf3e6a. We will want to do things a bit differently in CPython 3.13.Linked PRs
The text was updated successfully, but these errors were encountered: