From 87688197906db4cd5c4ab9d741276e2b1f4d68dd Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Tue, 27 Aug 2019 14:46:16 -0400 Subject: [PATCH] restart threads --- cadCAD/engine/simulation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cadCAD/engine/simulation.py b/cadCAD/engine/simulation.py index 32e9c5b..93e78c7 100644 --- a/cadCAD/engine/simulation.py +++ b/cadCAD/engine/simulation.py @@ -222,10 +222,15 @@ class Executor: return first_timestep_per_run + tp = TPool(runs) pipe_run: List[List[Dict[str, Any]]] = flatten( - TPool().map( + tp.map( lambda run: execute_run(sweep_dict, states_list, configs, env_processes, time_seq, run), list(range(runs)) ) ) + + # tp.close() + # tp.join() + tp.clear() return pipe_run