Skip to content

Commit ee11b8f

Browse files
committed
fix(core): properly shutdown manager
1 parent 5af36d2 commit ee11b8f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎metapang/core/index/index.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ def file_batch_signature(file: "Path | list[Path]", k: int, scaled: int, n: int,
213213
executor.shutdown(wait=False)
214214
os._exit(1)
215215

216-
return SourmashSignature(m.copy(), name=files[0].stem)
216+
signature = SourmashSignature(m.copy(), name=files[0].stem)
217+
man.shutdown()
218+
return signature
217219

218220
def construct(self, nb_cores: int, with_log: bool=True) -> IndexInfo:
219221
"""Construct and save the index, returning its IndexInfo."""
@@ -266,5 +268,6 @@ def construct(self, nb_cores: int, with_log: bool=True) -> IndexInfo:
266268
mp_log_info(with_log, f"Saving index info at '{self._config.output}'")
267269
info.save_json(self._config.output / "index_info.json")
268270

271+
manager.shutdown()
269272
return info
270273

0 commit comments

Comments
 (0)