Enclose ThreadPool.map call in a try/finally block
This commit is contained in:
parent
2d5aadc21d
commit
d5ab52b95a
@ -210,7 +210,9 @@ def find_compilers(*path_hints):
|
||||
|
||||
# Here we map the function arguments to the corresponding calls
|
||||
tp = multiprocessing.pool.ThreadPool()
|
||||
try:
|
||||
detected_versions = tp.map(detect_version, arguments)
|
||||
finally:
|
||||
tp.close()
|
||||
|
||||
def valid_version(item):
|
||||
|
Loading…
Reference in New Issue
Block a user