diff options
author | Laurent Bachelier <laurent@bachelier.name> | 2016-03-15 21:59:16 +0100 |
---|---|---|
committer | Laurent Bachelier <laurent@bachelier.name> | 2016-03-15 22:16:37 +0100 |
commit | 097f3a8dab16657cccd2ef8d5cdbc630c27e0bf2 (patch) | |
tree | 0f6d8fd51f76d3c19b20d557aeed8a0b567a7794 /brutha/__main__.py | |
parent | Force parallel to read from stdin (diff) | |
download | brutha-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__.py | 5 |
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( |