Skip to content

Commit 5d8ebc3

Browse files
authored
Merge pull request #1093 from ahoppen/ahoppen/sleep
Sleep sourcekit-lsp’s main thread for 10 years instead of leaking a continuation
2 parents 7f2234c + fd6c668 commit 5d8ebc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/sourcekit-lsp/SourceKitLSP.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ struct SourceKitLSP: AsyncParsableCommand {
267267
}
268268
)
269269

270-
// Park the main function.
270+
// Park the main function by sleeping for 10 years.
271271
// All request handling is done on other threads and sourcekit-lsp exits by calling `_Exit` when it receives a
272272
// shutdown notification.
273-
let _: Void = await withCheckedContinuation { _ in }
273+
try await Task.sleep(for: .seconds(60 * 60 * 24 * 365 * 10))
274274
}
275275
}

0 commit comments

Comments
 (0)