Skip to content

Conversation

@aisk
Copy link
Contributor

@aiskaisk commented Nov 17, 2023

@aiskaisk changed the title ssing critical sections to make io.TextIOWrapper thread safegh-111965: using critical sections to make io.TextIOWrapper thread safeNov 17, 2023
@@ -0,0 +1 @@
Using critical section to make ``io.TextIOWrapper`` thread safe without GIL.
Copy link
Member

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

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just noticed it

@colesburycolesbury self-requested a review November 17, 2023 14:34
@colesburycolesbury changed the title gh-111965: using critical sections to make io.TextIOWrapper thread safegh-111965: Use critical sections to make io.TextIOWrapper thread safeNov 17, 2023
Copy link
Contributor

@colesburycolesbury left a 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?

#include"Python.h"
#include"pycore_call.h"// _PyObject_CallMethod()
#include"pycore_codecs.h"// _PyCodecInfo_GetIncrementalDecoder()
#include"pycore_critical_section.h"
Copy link
Member

@corona10corona10Nov 18, 2023

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()

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

aiskand others added 2 commits November 18, 2023 16:31
Co-authored-by: Donghee Na <donghee.na@python.org>
Copy link
Member

@corona10corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aisk
Copy link
ContributorAuthor

aisk commented Nov 19, 2023

Thanks for the review!

@aiskaisk deleted the critical-sections-textiowrapper branch November 19, 2023 06:56
aisk added a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@aisk@colesbury@corona10