Skip to content

Commit 99322fa

Browse files
soulomoonmichaelpj
andauthored
Update WorkerThread.hs
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
1 parent 027e5be commit 99322fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ghcide/src/Development/IDE/Core/WorkerThread.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ import Control.Monad.Cont (ContT (ContT))
2323
-- * `blockRunInThread` : accepts a `TQueue` and an action to run in separate thread and waits for the result.
2424

2525

26-
-- | withWorkerQueue creates a new TQueue and runs the workerAction in a separate thread.
26+
-- | 'withWorkerQueue' creates a new 'TQueue', and launches a worker
27+
-- thread which polls the queue for requests and runs the given worker
28+
-- function on them.
2729
withWorkerQueue :: (t -> IO a) -> ContT () IO (TQueue t)
2830
withWorkerQueue workerAction = ContT $ \mainAction -> do
2931
q <- newTQueueIO

0 commit comments

Comments
 (0)