Limit default MAX_CONCURRENCY to 4.

This commit is contained in:
homm 2014-12-08 22:15:44 +03:00
parent 2d2293ba3b
commit 83fc485392
3 changed files with 5 additions and 9 deletions

View File

@ -3,8 +3,6 @@ language: python
notifications: notifications:
irc: "chat.freenode.net#pil" irc: "chat.freenode.net#pil"
env: MAX_CONCURRENCY=4
# Run slow PyPy* first, to give them a headstart and reduce waiting time. # Run slow PyPy* first, to give them a headstart and reduce waiting time.
# Run latest 3.x and 2.x next, to get quick compatibility results. # Run latest 3.x and 2.x next, to get quick compatibility results.
# Then run the remainder. # Then run the remainder.

View File

@ -97,11 +97,9 @@ Build Options
------------- -------------
* Environment Variable: ``MAX_CONCURRENCY=n``. By default, Pillow will * Environment Variable: ``MAX_CONCURRENCY=n``. By default, Pillow will
use multiprocessing to build the extension in parallel. This may not use multiprocessing to build the extension on all available CPU,
be ideal for machines that report a large number of cores compared but not more than 4. Setting ``MAX_CONCURRENCY`` to 1 will disable
to the actual processor power. Set ``MAX_CONCURRENCY`` to 1 to disable parallel building.
parallel building, or to a larger number to limit to that number of
parallel tasks.
* Build flags: ``--disable-zlib``, ``--disable-jpeg``, * Build flags: ``--disable-zlib``, ``--disable-jpeg``,
``--disable-tiff``, ``--disable-freetype``, ``--disable-tcl``, ``--disable-tiff``, ``--disable-freetype``, ``--disable-tcl``,

View File

@ -6,8 +6,8 @@ from distutils.ccompiler import CCompiler
import os, sys import os, sys
try: try:
MAX_PROCS = int(os.environ.get('MAX_CONCURRENCY', cpu_count())) MAX_PROCS = int(os.environ.get('MAX_CONCURRENCY', min(4, cpu_count())))
except: except NotImplementedError:
MAX_PROCS = None MAX_PROCS = None