mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-06-24 12:21:58 +02:00
13f842eb74
Wrap each `task.waitToFinish()` in `TaskScheduler.shutDown()` with a 10s `withTimeout` so a stuck QueuedTask cannot block sourcekit-lsp's shutdown indefinitely; on timeout, log the task description so the offender is identifiable. The QueuedTask is already cancelled via `task.cancel()` and continues winding down in the background. Add debug logs after `Process.waitUntilExit()` returns and after `Process.run` returns inside `prepare(singleTarget:)`, so a future shutdown hang can be triaged: did the swift build process actually exit, did `Process.run` propagate the result, or is the stall higher up in the prepare chain. Motivated by a recurring Windows CI hang in BackgroundIndexingTests.testSymlinkedTargetReferringToSameSourceFile where prepareForExit stalls for the full test timeout with no log output during shutdown.