Files
Rintaro Ishizaki 3c4cd65542 Let cancelled index compiler invocations finish on Windows
On Windows, a compiler holds a lock file in the module cache while it
builds an implicit module and only removes it when it exits normally.
`LockFileManager` can only tell that the owner of a lock file is gone
on Unix, so other compilers wait for the full lock timeout before
building the module themselves. Terminating an index compiler when its
task is cancelled, which happens whenever a server shuts down, thus
stalls unrelated compiler invocations that share the module cache.
Terminating `swiftc` has the same effect as terminating the frontend
because, for a single job, the driver runs the frontend in a job object
that is terminated together with the driver.

Add `ProcessCancellationBehavior` so that callers can choose to let a
process run until it exits when the waiting task is cancelled, and use
it for index compiler invocations on Windows. The index store update
timeout was implemented by cancelling the task, so it now terminates
the process explicitly instead, which keeps terminating compilers that
don't finish within the timeout.
2026-10-27 17:27:06 -07:00
..
2025-10-31 14:11:11 -07:00