mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Release GIL during read()
This commit is contained in:
@@ -610,7 +610,9 @@ FNAME(read_bytes)(PyObject UNUSED *self, PyObject *args) {
|
||||
#endif
|
||||
|
||||
while(true) {
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
len = read(fd, screen->read_buf, READ_BUF_SZ);
|
||||
Py_END_ALLOW_THREADS;
|
||||
if (len == -1) {
|
||||
if (errno == EINTR) continue;
|
||||
if (errno == EIO) { Py_RETURN_FALSE; }
|
||||
|
||||
Reference in New Issue
Block a user