mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
Merge pull request #1043 from homm/max-concurrency
Limit default MAX_CONCURRENCY to 4.
This commit is contained in:
commit
35cd2258cb
|
@ -3,8 +3,6 @@ language: python
|
|||
notifications:
|
||||
irc: "chat.freenode.net#pil"
|
||||
|
||||
env: MAX_CONCURRENCY=4
|
||||
|
||||
# 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.
|
||||
# Then run the remainder.
|
||||
|
|
|
@ -97,11 +97,9 @@ Build Options
|
|||
-------------
|
||||
|
||||
* Environment Variable: ``MAX_CONCURRENCY=n``. By default, Pillow will
|
||||
use multiprocessing to build the extension in parallel. This may not
|
||||
be ideal for machines that report a large number of cores compared
|
||||
to the actual processor power. Set ``MAX_CONCURRENCY`` to 1 to disable
|
||||
parallel building, or to a larger number to limit to that number of
|
||||
parallel tasks.
|
||||
use multiprocessing to build the extension on all available CPU,
|
||||
but not more than 4. Setting ``MAX_CONCURRENCY`` to 1 will disable
|
||||
parallel building.
|
||||
|
||||
* Build flags: ``--disable-zlib``, ``--disable-jpeg``,
|
||||
``--disable-tiff``, ``--disable-freetype``, ``--disable-tcl``,
|
||||
|
|
|
@ -6,8 +6,8 @@ from distutils.ccompiler import CCompiler
|
|||
import os, sys
|
||||
|
||||
try:
|
||||
MAX_PROCS = int(os.environ.get('MAX_CONCURRENCY', cpu_count()))
|
||||
except:
|
||||
MAX_PROCS = int(os.environ.get('MAX_CONCURRENCY', min(4, cpu_count())))
|
||||
except NotImplementedError:
|
||||
MAX_PROCS = None
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user