Skip to content

Conversation

@toinehartman
Copy link
Member

@toinehartman toinehartman commented Nov 19, 2025

LSP requests now in come in on multiple threads, which makes their order unpredictable. This causes subtle bugs, like #630 (which will be solved in a separate PR: #633).

  • Incoming requests/notifications should happen on a single, named thread pool. Note: take care of correct daemon setting.
  • Make sure that no request does long-running tasks on this thread pool.
  • Review all uses of CompletableFuture again and make sure they use the proper cached thread pool.
  • Review uses of CompletableFuture::completedFuture and use cached thread pool, so any chained futures are on the proper thread.
  • Document in DEVELOPERS.md

Closes #892.

@toinehartman toinehartman self-assigned this Nov 19, 2025
@toinehartman toinehartman added bug Something isn't working documentation Improvements or additions to documentation labels Nov 19, 2025
@toinehartman toinehartman linked an issue Nov 19, 2025 that may be closed by this pull request
@toinehartman toinehartman force-pushed the fix/892-lsp-races branch 3 times, most recently from 08fefa5 to 41ca7f2 Compare November 19, 2025 13:21
This makes sure the order of incoming LSP requests is maintained,
preventing races in downstream workers.
@toinehartman toinehartman force-pushed the fix/892-lsp-races branch 2 times, most recently from 22577ce to efbea10 Compare November 24, 2025 13:16
@toinehartman toinehartman marked this pull request as ready for review November 25, 2025 13:29
@sonarqubecloud
Copy link

@DavyLandman DavyLandman merged commit f82f96b into main Nov 26, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix races in incoming LSP requests

2 participants