Skip to content

Commit

Permalink
Revert "lit: revert 134b103"
Browse files Browse the repository at this point in the history
This reverts commit d319005.

Causing messages like:

  File "...\Python\Python39\lib\multiprocessing\connection.py", line 816, in _exhaustive_wait
    res = _winapi.WaitForMultipleObjects(L, False, timeout)
ValueError: need at most 63 handles, got a sequence of length 74
  • Loading branch information
aeubanks committed May 8, 2021
1 parent d82bc9e commit ddff81f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions llvm/utils/lit/lit/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ def usable_core_count():
n = len(os.sched_getaffinity(0))
except AttributeError:
n = os.cpu_count() or 1

# On Windows, with more than 32 processes, process creation often fails with
# "Too many open files". FIXME: Check if there's a better fix.
if platform.system() == 'Windows':
return min(n, 32)

return n


Expand Down

0 comments on commit ddff81f

Please sign in to comment.