Skip to content

Commit

Permalink
wait for cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
soulomoon committed May 6, 2024
1 parent f8220ba commit 013650b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ghcide/src/Development/IDE/Core/Shake.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module Development.IDE.Core.Shake(
) where

import Control.Concurrent.Async
import Control.Concurrent.Extra (signalBarrier)
import Control.Concurrent.STM

Check warning on line 81 in ghcide/src/Development/IDE/Core/Shake.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Warning in module Development.IDE.Core.Shake: Use fewer imports ▫︎ Found: "import Control.Concurrent.STM\nimport Control.Concurrent.STM ( writeTQueue )\n" ▫︎ Perhaps: "import Control.Concurrent.STM\n"
import Control.Concurrent.STM (writeTQueue)
import Control.Concurrent.STM.Stats (atomicallyNamed)
Expand Down Expand Up @@ -174,7 +175,6 @@ import qualified StmContainers.Map as STM
import System.FilePath hiding (makeRelative)
import System.IO.Unsafe (unsafePerformIO)
import System.Time.Extra
import Control.Concurrent.Extra (signalBarrier)
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]

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

0 comments on commit 013650b

Please sign in to comment.