Enclose ThreadPool.map call in a try/finally block

This commit is contained in:
Massimiliano Culpo 2019-06-07 08:46:19 +02:00
parent 2d5aadc21d
commit d5ab52b95a
No known key found for this signature in database
GPG Key ID: D1ADB1014FF1118C

View File

@ -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):