Make processing multiple files safer concurrence-wise
This commit is contained in:
parent
1c3e2afa1e
commit
1b37604d3a
2
mat2
2
mat2
@ -221,8 +221,8 @@ def main() -> int:
|
||||
files = __get_files_recursively(args.files)
|
||||
# We have to use Processes instead of Threads, since
|
||||
# we're using tempfile.mkdtemp, which isn't thread-safe.
|
||||
with concurrent.futures.ProcessPoolExecutor() as executor:
|
||||
futures = list()
|
||||
with concurrent.futures.ProcessPoolExecutor() as executor:
|
||||
for f in files:
|
||||
future = executor.submit(clean_meta, f, args.lightweight,
|
||||
inplace, args.sandbox, policy)
|
||||
|
Loading…
Reference in New Issue
Block a user