aboutsummaryrefslogtreecommitdiffstats
path: root/brutha/__main__.py
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2016-03-15 21:59:16 +0100
committerLaurent Bachelier <laurent@bachelier.name>2016-03-15 22:16:37 +0100
commit097f3a8dab16657cccd2ef8d5cdbc630c27e0bf2 (patch)
tree0f6d8fd51f76d3c19b20d557aeed8a0b567a7794 /brutha/__main__.py
parentForce parallel to read from stdin (diff)
downloadbrutha-097f3a8dab16657cccd2ef8d5cdbc630c27e0bf2.tar.xz
Better method to find out CPU cores
More portable and simpler. Requires Python >=2.6 which is already our requirement.
Diffstat (limited to 'brutha/__main__.py')
-rw-r--r--brutha/__main__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/brutha/__main__.py b/brutha/__main__.py
index 4e31f33..6097218 100644
--- a/brutha/__main__.py
+++ b/brutha/__main__.py
@@ -5,14 +5,15 @@ from __future__ import absolute_import
import argparse
import sys
from StringIO import StringIO
+from multiprocessing import cpu_count
from .output import OUTPUTS
from .tree import Tree
-from .util import default_output, detect_cores
+from .util import default_output
def main():
- cores = detect_cores()
+ cores = cpu_count()
output = default_output(cores)
parser = argparse.ArgumentParser(