Bug 1624670 - remove max_workers argument for ProcessPoolExecutor; r=dmajor

`ProcessPoolExecutor` will naturally default to the number of CPUs on
the machine and will also handle edge cases on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D68185

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nathan Froyd 2020-03-25 15:20:37 +00:00
parent b4133b9d99
commit 98d5951dcc

View File

@ -34,7 +34,6 @@ from collections import (
) )
from io import StringIO from io import StringIO
from itertools import chain from itertools import chain
from multiprocessing import cpu_count
import six import six
from six import string_types from six import string_types
@ -855,8 +854,9 @@ class BuildReader(object):
for path, f in self._relevant_mozbuild_finder.find('*/config.status'): for path, f in self._relevant_mozbuild_finder.find('*/config.status'):
self._relevant_mozbuild_finder.ignore.add(os.path.dirname(path)) self._relevant_mozbuild_finder.ignore.add(os.path.dirname(path))
max_workers = cpu_count() # ProcessPoolExecutor will naturally default to the number of CPUs
self._gyp_worker_pool = ProcessPoolExecutor(max_workers=max_workers) # on the machine and will also handle edge cases on Windows.
self._gyp_worker_pool = ProcessPoolExecutor()
self._gyp_processors = [] self._gyp_processors = []
self._execution_time = 0.0 self._execution_time = 0.0
self._file_count = 0 self._file_count = 0