From 6aa446cf039f9533a5ecf2400bf060db4313a417 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 30 Mar 2015 21:33:51 +0200 Subject: 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() --- Modules/_threadmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/_threadmodule.c') diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index 0907aa0eb2..323447f9da 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -84,7 +84,7 @@ acquire_timed(PyThread_type_lock lock, _PyTime_t timeout) /* Check for negative values, since those mean block forever. */ - if (timeout <= 0) { + if (timeout < 0) { r = PY_LOCK_FAILURE; } } -- cgit v1.2.1