-
-
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
gh-111965: Use critical sections to make io.TextIOWrapper thread safe #112193
Conversation
@@ -0,0 +1 @@ | |||
Using critical section to make ``io.TextIOWrapper`` thread safe without GIL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I commented before, NEWS.d is not needed for this task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just noticed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@corona10 would you please look over this one as well?
Modules/_io/textio.c
Outdated
@@ -9,6 +9,7 @@ | |||
#include "Python.h" | |||
#include "pycore_call.h" // _PyObject_CallMethod() | |||
#include "pycore_codecs.h" // _PyCodecInfo_GetIncrementalDecoder() | |||
#include "pycore_critical_section.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment as the same as the other header. // Py_BEGIN_CRITICAL_SECTION()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Co-authored-by: Donghee Na <donghee.na@python.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for the review! |
--disable-gil
builds) #111965