gh-74953: Fix PyThread_acquire_lock_timed() code recomputing the timeout (#93941)
Set timeout, don't create a local variable with the same name.
This commit is contained in:
@@ -497,7 +497,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
|
||||
#ifndef HAVE_SEM_CLOCKWAIT
|
||||
if (timeout > 0) {
|
||||
/* wait interrupted by a signal (EINTR): recompute the timeout */
|
||||
_PyTime_t timeout = _PyDeadline_Get(deadline);
|
||||
timeout = _PyDeadline_Get(deadline);
|
||||
if (timeout < 0) {
|
||||
status = ETIMEDOUT;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user