Commit 104e29a5 authored by Colm Talbot's avatar Colm Talbot
Browse files

Make sure to remove pool

parent 8c4a3315
Pipeline #115825 passed with stage
in 5 minutes and 49 seconds
......@@ -288,7 +288,6 @@ class Dynesty(NestedSampler):
self.use_ratio
)
)
self.kwargs["pool"] = self.pool
else:
_initialize_global_variables(
likelihood=self.likelihood,
......@@ -297,6 +296,7 @@ class Dynesty(NestedSampler):
use_ratio=self.use_ratio
)
self.pool = None
self.kwargs["pool"] = self.pool
def _close_pool(self):
if getattr(self, "pool", None) is not None:
......@@ -304,6 +304,7 @@ class Dynesty(NestedSampler):
self.pool.close()
self.pool.join()
self.pool = None
self.kwargs["pool"] = self.pool
logger.info("Finished closing worker pool.")
def run_sampler(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment