aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index a45d842ffe7..7f04151ca91 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -481,11 +481,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
}
else if (dt > 0) {
_PyTime_t realtime_deadline = _PyTime_GetSystemClock() + dt;
- if (_PyTime_AsTimespec(realtime_deadline, &ts) < 0) {
- /* Cannot occur thanks to (microseconds > PY_TIMEOUT_MAX)
- check done above */
- Py_UNREACHABLE();
- }
+ _PyTime_AsTimespec_clamp(realtime_deadline, &ts);
/* no need to update microseconds value, the code only care
if (microseconds > 0 or (microseconds == 0). */
}