summaryrefslogtreecommitdiff
path: root/taskflow/utils/threading_utils.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2015-06-26 14:42:18 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2015-07-09 15:01:35 -0700
commit27272a2aa70b56182b67a06d3707430e86a0ccde (patch)
tree81368600382a72a411327f08066010aac7ef7509 /taskflow/utils/threading_utils.py
parent87c12603eb2455802c9baa53caa31fb12e11279e (diff)
downloadtaskflow-27272a2aa70b56182b67a06d3707430e86a0ccde.tar.gz
Integrate futurist (and **remove** taskflow originating code)
Change-Id: If89baa042695f19e42b6368034f3ccf22c2cf0aa
Diffstat (limited to 'taskflow/utils/threading_utils.py')
-rw-r--r--taskflow/utils/threading_utils.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/taskflow/utils/threading_utils.py b/taskflow/utils/threading_utils.py
index e859fff..7de0151 100644
--- a/taskflow/utils/threading_utils.py
+++ b/taskflow/utils/threading_utils.py
@@ -15,7 +15,6 @@
# under the License.
import collections
-import multiprocessing
import threading
import six
@@ -36,17 +35,6 @@ def get_ident():
return _thread.get_ident()
-def get_optimal_thread_count():
- """Try to guess optimal thread count for current system."""
- try:
- return multiprocessing.cpu_count() + 1
- except NotImplementedError:
- # NOTE(harlowja): apparently may raise so in this case we will
- # just setup two threads since it's hard to know what else we
- # should do in this situation.
- return 2
-
-
def daemon_thread(target, *args, **kwargs):
"""Makes a daemon thread that calls the given target when started."""
thread = threading.Thread(target=target, args=args, kwargs=kwargs)