Limit python multiprocessing jobs on windows due to Python3 bug.

Python3 appears to have a bug causing hangs when running jobs using the
`multiprocessing` module to distribute tasks across more than 56 cores
on Windows.

This CL puts a ceiling on any such code to avoid the hang. This
should have little to no impact in practice because there are
few if any such tasks that we do that really take advantage of
that many cores. But, because it's not uncommon to use the default
cpu_count() value, we are more prone to hit this on very high-end
machines.

This CL does not change any Android-specific scripts, since those
won't be run on Windows.

Bug: 1190269
Change-Id: Id2a4d9f36294e53878e452f9bf713f0ba2c0345f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2785844
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: John Chen <johnchen@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#866704}
GitOrigin-RevId: 34c093a46568ca3e4dc2057496699542cf6eaf6a
1 file changed