Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d657b6

Browse files
add file header comment
1 parent 442e776 commit 5d657b6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
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+
-}
19
module Development.IDE.Core.WorkerThread
210
(withWorkerQueue, awaitRunInThread)
311
where
412

5-
import Control.Concurrent.Async
13+
import Control.Concurrent.Async (withAsync)
614
import Control.Concurrent.STM
715
import Control.Concurrent.Strict (newBarrier, signalBarrier,
816
waitBarrier)
@@ -18,8 +26,6 @@ Like the db writes, session loading in session loader, shake session restarts.
1826
1927
Originally we used various ways to implement this, but it was hard to maintain and error prone.
2028
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.
2329
-}
2430

2531
-- | 'withWorkerQueue' creates a new 'TQueue', and launches a worker

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /