Content-Length: 206703 | pFad | http://github.com/python/cpython/commit/f64557f4803528c53bb9a1d565e3cdf92e97152f

E4 gh-74953: Fix PyThread_acquire_lock_timed() code recomputing the time… · python/cpython@f64557f · GitHub
Skip to content

Commit

Permalink
gh-74953: Fix PyThread_acquire_lock_timed() code recomputing the time…
Browse files Browse the repository at this point in the history
…out (#93941)

Set timeout, don't create a local variable with the same name.
  • Loading branch information
vstinner authored Jun 17, 2022
1 parent e444752 commit f64557f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/thread_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f64557f

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/commit/f64557f4803528c53bb9a1d565e3cdf92e97152f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy