Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid hangs on many-core Windows machines #7035

Merged
merged 8 commits into from Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/whatsnew/2/2.15/index.rst
Expand Up @@ -94,3 +94,6 @@ Internal changes
let the functional test fail with a default value.

Refs #6891

* Fixed an issue where many-core Windows machines (>~60 logical processors) would hang when
using the default jobs count.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to backport that in 2.14.4 :)

5 changes: 5 additions & 0 deletions pylint/lint/run.py
Expand Up @@ -190,6 +190,11 @@ def __init__(
linter.set_option("jobs", 1)
elif linter.config.jobs == 0:
linter.config.jobs = _cpu_count()
if sys.platform == "win32":
randomascii marked this conversation as resolved.
Show resolved Hide resolved
# Using too many child processes in Python 3 hits either hangs or a
# ValueError exception, and, has diminishing returns. Clamp to 56 to
# give margin for error.
min(jobs, 56)

if self._output:
try:
Expand Down