mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Support new Condition return value in the multiprocessing version.
This commit is contained in:
		
							parent
							
								
									7362c4f311
								
							
						
					
					
						commit
						2fa4cc55e9
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -217,7 +217,7 @@ def wait(self, timeout=None): | ||||||
| 
 | 
 | ||||||
|         try: |         try: | ||||||
|             # wait for notification or timeout |             # wait for notification or timeout | ||||||
|             self._wait_semaphore.acquire(True, timeout) |             ret = self._wait_semaphore.acquire(True, timeout) | ||||||
|         finally: |         finally: | ||||||
|             # indicate that this thread has woken |             # indicate that this thread has woken | ||||||
|             self._woken_count.release() |             self._woken_count.release() | ||||||
|  | @ -225,6 +225,7 @@ def wait(self, timeout=None): | ||||||
|             # reacquire lock |             # reacquire lock | ||||||
|             for i in range(count): |             for i in range(count): | ||||||
|                 self._lock.acquire() |                 self._lock.acquire() | ||||||
|  |             return ret | ||||||
| 
 | 
 | ||||||
|     def notify(self): |     def notify(self): | ||||||
|         assert self._lock._semlock._is_mine(), 'lock is not owned' |         assert self._lock._semlock._is_mine(), 'lock is not owned' | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl