1
+ {-
2
+ Module : Development.IDE.Core.WorkerThread
3
+ Author : @soulomoon
4
+ SPDX-License-Identifier: Apache-2.0
5
+
6
+ Description : This module provides an API for managing worker threads in the IDE.
7
+ see Note [Serializing runs in separate thread]
8
+ -}
1
9
module Development.IDE.Core.WorkerThread
2
10
(withWorkerQueue , awaitRunInThread )
3
11
where
4
12
5
- import Control.Concurrent.Async
13
+ import Control.Concurrent.Async ( withAsync )
6
14
import Control.Concurrent.STM
7
15
import Control.Concurrent.Strict (newBarrier , signalBarrier ,
8
16
waitBarrier )
@@ -18,8 +26,6 @@ Like the db writes, session loading in session loader, shake session restarts.
18
26
19
27
Originally we used various ways to implement this, but it was hard to maintain and error prone.
20
28
Moreover, we can not stop these threads uniformly when we are shutting down the server.
21
-
22
- `Development.IDE.Core.WorkerThread` module provides a simple api to implement this easily.
23
29
-}
24
30
25
31
-- | 'withWorkerQueue' creates a new 'TQueue', and launches a worker
0 commit comments