Content-Length: 269286 | pFad | https://github.com/python/cpython/commit/e8545ed3eafbf349b51ea308126a67dc70416a62

BE gh-149816: add missing critical section on self in buffered_iternext … · python/cpython@e8545ed · GitHub
Skip to content

Commit e8545ed

Browse files
gh-149816: add missing critical section on self in buffered_iternext (#150295)
1 parent 1b20d19 commit e8545ed

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: https://github.com/python/cpython/commit/e8545ed3eafbf349b51ea308126a67dc70416a62

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy