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

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

Bug: 1190269
Change-Id: Id2a4d9f36294e53878e452f9bf713f0ba2c0345f
Commit-Queue: Dirk Pranke <>
Reviewed-by: John Chen <>
Reviewed-by: Robert Sesek <>
Reviewed-by: Kentaro Hara <>
Reviewed-by: Yuki Shiino <>
Cr-Commit-Position: refs/heads/master@{#866704}
GitOrigin-RevId: 34c093a46568ca3e4dc2057496699542cf6eaf6a
1 file changed