diff options
Diffstat (limited to 'vicn/core/task.py')
-rw-r--r-- | vicn/core/task.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vicn/core/task.py b/vicn/core/task.py index 5aecb40b..9c92ef4d 100644 --- a/vicn/core/task.py +++ b/vicn/core/task.py @@ -22,6 +22,7 @@ import functools import logging import shlex import subprocess +import os from vicn.core.scheduling_algebra import SchedulingAlgebra from vicn.core.commands import ReturnValue @@ -34,7 +35,8 @@ log = logging.getLogger(__name__) EXECUTOR=concurrent.futures.ThreadPoolExecutor #EXECUTOR=concurrent.futures.ProcessPoolExecutor -MAX_WORKERS = 50 # None +#Sets the number of task workers to the number of CPU threads+1 +MAX_WORKERS = os.cpu_count()+1 class BaseTask: """Base class for all tasks |