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()
This commit is contained in:
Victor Stinner 2015-03-30 21:33:51 +02:00
parent f70e1ca0fc
commit 6aa446cf03
3 changed files with 3 additions and 3 deletions

View file

@ -1011,7 +1011,7 @@ signal_sigtimedwait(PyObject *self, PyObject *args)
monotonic = _PyTime_GetMonotonicClock();
timeout = deadline - monotonic;
if (timeout <= 0)
if (timeout < 0)
break;
} while (1);