Issue #7316: the acquire() method of lock objects in the :mod:threading

module now takes an optional timeout argument in seconds.  Timeout support
relies on the system threading library, so as to avoid a semi-busy wait
loop.
This commit is contained in:
Antoine Pitrou 2010-04-14 15:44:10 +00:00
parent e53de3dc4a
commit 7c3e577395
11 changed files with 326 additions and 77 deletions

View file

@ -440,10 +440,10 @@ class Pool(object):
p.terminate()
debug('joining task handler')
task_handler.join(1e100)
task_handler.join()
debug('joining result handler')
result_handler.join(1e100)
task_handler.join()
if pool and hasattr(pool[0], 'terminate'):
debug('joining pool workers')