diff --git a/ghcide/src/Development/IDE/Core/WorkerThread.hs b/ghcide/src/Development/IDE/Core/WorkerThread.hs index 20766cafd3..cb5bb60516 100644 --- a/ghcide/src/Development/IDE/Core/WorkerThread.hs +++ b/ghcide/src/Development/IDE/Core/WorkerThread.hs @@ -23,6 +23,7 @@ import Control.Monad.Cont (ContT (ContT)) -- * `blockRunInThread` : accepts a `TQueue` and an action to run in separate thread and waits for the result. +-- | withWorkerQueue creates a new TQueue and runs the workerAction in a separate thread. withWorkerQueue :: (t -> IO a) -> ContT () IO (TQueue t) withWorkerQueue workerAction = ContT $ \mainAction -> do q <- newTQueueIO