mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
Fix potential NameError in multiprocessing.Condition.wait()
This commit is contained in:
parent
ad06444d6c
commit
86eb7e97ae
1 changed files with 1 additions and 2 deletions
|
|
@ -216,7 +216,7 @@ def wait(self, timeout=None):
|
|||
|
||||
try:
|
||||
# wait for notification or timeout
|
||||
ret = self._wait_semaphore.acquire(True, timeout)
|
||||
return self._wait_semaphore.acquire(True, timeout)
|
||||
finally:
|
||||
# indicate that this thread has woken
|
||||
self._woken_count.release()
|
||||
|
|
@ -224,7 +224,6 @@ def wait(self, timeout=None):
|
|||
# reacquire lock
|
||||
for i in range(count):
|
||||
self._lock.acquire()
|
||||
return ret
|
||||
|
||||
def notify(self):
|
||||
assert self._lock._semlock._is_mine(), 'lock is not owned'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue