Skip to content

Unify critical session running in hls #4251

Closed
soulomoon/haskell-language-server
#16
@soulomoon

Description

@soulomoon

There are some places we serialize critical session.

  • Reactor thread, running the notification handler, by running it in the reactor thread.
  • sessionLoader, we load session one by one, spawn a thread each time, and wait for the preivous thread to end.
  • sessionRestart, we runs it in seperate threads but using an MVar to do the serlization.

The latter two create a challenge for our shutdown handler to halt the hls. Since they are not cancelable.
A possible solution, would be to switch the latter two to the first approach. Create a thread specifically to run the target critical session.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions