ghcide-2.9.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageGHC2021

Development.IDE.Core.WorkerThread

Synopsis

Documentation

withWorkerQueue :: (t -> IO a) -> ContT () IO (TQueue t) Source #

withWorkerQueue creates a new TQueue, and launches a worker thread which polls the queue for requests and runs the given worker function on them.

awaitRunInThread :: TQueue (IO ()) -> IO result -> IO result Source #

awaitRunInThread queues up an IO action to be run by a worker thread, and then blocks until the result is computed.