From 87688197906db4cd5c4ab9d741276e2b1f4d68dd Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Tue, 27 Aug 2019 14:46:16 -0400 Subject: [PATCH 1/2] 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 From db7de4fe4f00378115147c085d65475286f8b2f0 Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Tue, 27 Aug 2019 15:28:10 -0400 Subject: [PATCH 2/2] restart threads --- cadCAD/engine/simulation.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cadCAD/engine/simulation.py b/cadCAD/engine/simulation.py index 93e78c7..5c6781e 100644 --- a/cadCAD/engine/simulation.py +++ b/cadCAD/engine/simulation.py @@ -230,7 +230,5 @@ class Executor: ) ) - # tp.close() - # tp.join() tp.clear() return pipe_run