mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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:
parent
e53de3dc4a
commit
7c3e577395
11 changed files with 326 additions and 77 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue