Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,11 @@ def close(self) -> None:
if self.connected:
self.conn.close()
# Technically we don't need to wait, but otherwise we will get ResourceWarnings.
# Also, it is generally good to not leave some running worker processes behind.
try:
self.proc.wait(timeout=WORKER_SHUTDOWN_TIMEOUT)
except subprocess.TimeoutExpired:
pass
self.proc.terminate()
if os.path.isfile(self.status_file):
os.unlink(self.status_file)

Expand Down
2 changes: 1 addition & 1 deletion mypy/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
# with our generous timeouts, so we set them higher.
WORKER_START_INTERVAL: Final = 0.01 if sys.platform != "win32" else 0.03
WORKER_START_TIMEOUT: Final = 3 if sys.platform != "win32" else 10
WORKER_SHUTDOWN_TIMEOUT: Final = 1 if sys.platform != "win32" else 3
WORKER_SHUTDOWN_TIMEOUT: Final = 3 if sys.platform != "win32" else 10

WORKER_CONNECTION_TIMEOUT: Final = 10
WORKER_IDLE_TIMEOUT: Final = 600
Expand Down
Loading