fsprojects / fsharp-language-server

Other
214 stars 37 forks source link

writeClient thread safety #75

Closed tboby closed 4 years ago

tboby commented 4 years ago

This is almost certainly due to my misuse of tasks, but thought it might be worth mentioning:

https://github.com/fsprojects/fsharp-language-server/blob/4f564e8355ab9753b04d5eee65292a17bd1050b3/src/LSP/LanguageServer.fs#L57-L58

It's possible for two headers to be written in a row under high load, which can silently crash things depending on how you've got the client logging. I've just put a lock around the two writes.

georgewfraser commented 4 years ago

The LSP is single-threaded, and this language server is single-threaded.