Content-Length: 274855 | pFad | http://github.com/python/cpython/commit/ca59d7511e2484fc55b1686b5a8e745322db73ec

60 [3.15] gh-149816: add missing critical section on self in buffered_it… · python/cpython@ca59d75 · GitHub
Skip to content

Commit ca59d75

Browse files
[3.15] gh-149816: add missing critical section on self in buffered_iternext (GH-150295) (#150305)
gh-149816: add missing critical section on self in buffered_iternext (GH-150295) (cherry picked from commit e8545ed) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent 8a162b2 commit ca59d75

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/_io/bufferedio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,9 @@ buffered_iternext(PyObject *op)
15091509
tp == state->PyBufferedRandom_Type)
15101510
{
15111511
/* Skip method call overhead for speed */
1512+
Py_BEGIN_CRITICAL_SECTION(self);
15121513
line = _buffered_readline(self, -1);
1514+
Py_END_CRITICAL_SECTION();
15131515
}
15141516
else {
15151517
line = PyObject_CallMethodNoArgs((PyObject *)self,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/commit/ca59d7511e2484fc55b1686b5a8e745322db73ec

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy