PEP 475: on EINTR, retry the function even if the timeout is equals t… · pythoncapi/cpython@6aa446c · GitHub
Skip to content

Commit 6aa446c

Browse files
committed
PEP 475: on EINTR, retry the function even if the timeout is equals to zero
Retry: * signal.sigtimedwait() * threading.Lock.acquire() * threading.RLock.acquire() * time.sleep()
1 parent f70e1ca commit 6aa446c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Modules/_threadmodule.c

Lines changed: 1 addition & 1 deletion

Modules/signalmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ signal_sigtimedwait(PyObject *self, PyObject *args)
10111011

10121012
monotonic = _PyTime_GetMonotonicClock();
10131013
timeout = deadline - monotonic;
1014-
if (timeout <= 0)
1014+
if (timeout < 0)
10151015
break;
10161016
} while (1);
10171017

Modules/timemodule.c

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)