haskell / haskell/haskell-language-server

Make workerqueue cancellable if not started already configurable

Open
#4,297 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
3d 21h
Merged PRs (30d)
13

Description

> it's pretty much identical to having a resource that's guarded by a lock

yes, with a bit different, enqueued actions would not be cancelled even if the thread (enqueue it) is cancelled.

It reminds me of something, we might probably want to limit some of the queue size to 1, so the waiting to enqueue action can be cancelled when we are doing shakeRestart. Then less likely a duplicated action would be run for the sessionLoadQueue
But maybe in another PR, we might need to come up with some design, such as we might need a bit wrapping to do over TQueue and TMVar if we do it this way.

_Originally posted by @soulomoon in https://github.com/haskell/haskell-language-server/issues/4256#issuecomment-2156089965_

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or concrete entry point is identified. Start by tracing workerqueue and sessionLoadQueue around shakeRestart, then inspect how TQueue and TMVar handle cancellation. Done requires an agreed, configurable behavior for cancelling actions that have not started.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.