From e800cac6a2697032abe0b8041c882c88012f7c96 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 8 Jun 2024 20:32:26 +0800 Subject: [PATCH] Improve Note --- ghcide/src/Development/IDE/Core/WorkerThread.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghcide/src/Development/IDE/Core/WorkerThread.hs b/ghcide/src/Development/IDE/Core/WorkerThread.hs index fb0266dc0b..20766cafd3 100644 --- a/ghcide/src/Development/IDE/Core/WorkerThread.hs +++ b/ghcide/src/Development/IDE/Core/WorkerThread.hs @@ -11,7 +11,8 @@ import Control.Monad.Cont (ContT (ContT)) -- Note [Serializing runs in separate thread] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- In a lof cases we want to have a separate thread that will serialize the runs of the actions. +-- We often want to take long-running actions using some resource that cannot be shared. +-- In this instance it is useful to have a queue of jobs to run using the resource. -- Like the db writes, session loading in session loader, shake session restarts. -- -- Originally we used various ways to implement this, but it was hard to maintain and error prone.