From 365a85b5af7a56ff57dfe664356950082e116d7d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bayle <j2b.bayle@gmail.com> Date: Fri, 14 Oct 2022 15:55:37 +0100 Subject: [PATCH] Change default number of workers to three --- lisainstrument/containers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisainstrument/containers.py b/lisainstrument/containers.py index d26b720..19856e5 100644 --- a/lisainstrument/containers.py +++ b/lisainstrument/containers.py @@ -31,7 +31,7 @@ class ForEachObject(abc.ABC): self.dict = {mosa: values[mosa] for mosa in self.indices()} elif callable(values): if concurrent: - with ThreadPoolExecutor() as executor: + with ThreadPoolExecutor(max_workers=3) as executor: indices = self.indices() computed_values = executor.map(values, indices) self.dict = dict(zip(indices, computed_values)) -- GitLab