haskell / lsp

Haskell library for the Microsoft Language Server Protocol
364 stars 91 forks source link

Concurrent handling of lsp handlers #409

Open pgujjula opened 2 years ago

pgujjula commented 2 years ago

Hello!

Currently it seems that the lsp handlers are not executed concurrently, so only one can run at a time. Are there any workarounds for this, or any plans to make it possible to run the handlers concurrently?

michaelpj commented 2 years ago

Indeed, it's currently up to the user to manage scheduling if they want to. The simple example is single-threaded. You can look at the reactor example for a concurrent version, HLS does something similar.

I'm a bit dissatisfied with the situation indeed, and I'd like to figure out a way to make it easier to get a concurrent server, while leaving as much scheduling control as possible in the hands of the user...