diff --git a/lisainstrument/containers.py b/lisainstrument/containers.py index d26b72091e1af4b55f51bf4f9f18589bf9344079..19856e5b6355b8263fc2ce32abbe66fef614bc03 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))