gentle shutdown

This commit is contained in:
Brad Warren 2021-04-07 09:16:34 -07:00
parent 7dc2590e4f
commit a1e9641e9c

View file

@ -249,7 +249,7 @@ def main():
manager: SyncManager = Manager()
pool = Pool(processes=len(targets))
with manager, pool:
with manager:
status: Dict[str, Dict[str, str]] = manager.dict()
running = manager.dict({target: True for target in targets})
# While multiple processes are running, this lock should be acquired
@ -271,6 +271,8 @@ def main():
workspaces = {}
for async_result in async_results:
workspaces.update(async_result.get())
pool.close()
pool.join()
if _dump_results(targets, archs, status, workspaces):
raise ValueError("There were failures during the build!")