ThreadPool doesn't implement the context manager protocol in Python 2
This commit is contained in:
parent
d89aa69f96
commit
f8bbfe683c
@ -195,8 +195,9 @@ def find_compilers(*paths):
|
|||||||
t, c = o.search_compiler_commands(*paths)
|
t, c = o.search_compiler_commands(*paths)
|
||||||
tags.extend(t), commands.extend(c)
|
tags.extend(t), commands.extend(c)
|
||||||
|
|
||||||
with multiprocessing.pool.ThreadPool() as tp:
|
tp = multiprocessing.pool.ThreadPool()
|
||||||
compiler_versions = llnl.util.multiproc.execute(commands, tp.map)
|
compiler_versions = llnl.util.multiproc.execute(commands, tp.map)
|
||||||
|
tp.close()
|
||||||
|
|
||||||
return spack.compiler.make_compiler_list(tags, compiler_versions)
|
return spack.compiler.make_compiler_list(tags, compiler_versions)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user