summaryrefslogtreecommitdiff
path: root/taskflow/engines/action_engine/executor.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2015-03-13 14:29:34 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2015-03-18 14:50:59 -0700
commit22fd32fb55d45b5f355a862b2edd78fde3c2086f (patch)
tree19dd4de4b27f229f38eca6c67a2add352f369212 /taskflow/engines/action_engine/executor.py
parent2232c5a88db56093aefca0c919a6ff2e73709559 (diff)
downloadtaskflow-22fd32fb55d45b5f355a862b2edd78fde3c2086f.tar.gz
Just let the future executors handle the max workers
Instead of providing and retaining a thread count in the worker and action engine executors and checking it and handling the none case, we can just let the future types handle this already (which they already do). And when displaying this information in the worker banner use a new future executor attribute that is the maximum number of workers that will be ever created. Change-Id: I765c22936b53cdbb8a90195a764d4c67bcc3f34b
Diffstat (limited to 'taskflow/engines/action_engine/executor.py')
-rw-r--r--taskflow/engines/action_engine/executor.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/taskflow/engines/action_engine/executor.py b/taskflow/engines/action_engine/executor.py
index b271beb..bd222a5 100644
--- a/taskflow/engines/action_engine/executor.py
+++ b/taskflow/engines/action_engine/executor.py
@@ -417,11 +417,8 @@ class ParallelTaskExecutor(TaskExecutor):
def start(self):
if self._own_executor:
- if self._max_workers is not None:
- max_workers = self._max_workers
- else:
- max_workers = threading_utils.get_optimal_thread_count()
- self._executor = self._create_executor(max_workers=max_workers)
+ self._executor = self._create_executor(
+ max_workers=self._max_workers)
def stop(self):
if self._own_executor: