Skip to content

Commit 013650b

Browse files
committed
wait for cancel
1 parent f8220ba commit 013650b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ module Development.IDE.Core.Shake(
7777
) where
7878

7979
import Control.Concurrent.Async
80+
import Control.Concurrent.Extra (signalBarrier)
8081
import Control.Concurrent.STM
8182
import Control.Concurrent.STM (writeTQueue)
8283
import Control.Concurrent.STM.Stats (atomicallyNamed)
@@ -174,7 +175,6 @@ import qualified StmContainers.Map as STM
174175
import System.FilePath hiding (makeRelative)
175176
import System.IO.Unsafe (unsafePerformIO)
176177
import System.Time.Extra
177-
import Control.Concurrent.Extra (signalBarrier)
178178
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
179179

180180
#if !MIN_VERSION_ghc(9,3,0)
@@ -766,8 +766,8 @@ shakeRestart recorder IdeState{..} vfs reason acts ioActionBetweenShakeSession =
766766
withMVar'
767767
shakeSession
768768
(\runner -> do
769-
signalBarrier barrier ()
770769
(stopTime,()) <- duration $ logErrorAfter 10 $ cancelShakeSession runner
770+
signalBarrier barrier ()
771771
keys <- ioActionBetweenShakeSession
772772
atomically $ modifyTVar' (dirtyKeys shakeExtras) $ \x -> foldl' (flip insertKeySet) x keys
773773
res <- shakeDatabaseProfile shakeDb

0 commit comments

Comments
 (0)