File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
ghcide/src/Development/IDE/Core Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ module Development.IDE.Core.Shake(
7575 VFSModified (.. ), getClientConfigAction ,
7676 ) where
7777
78- import Control.Concurrent (withMVar )
78+ import Control.Concurrent (tryReadMVar , withMVar )
7979import Control.Concurrent.Async
8080import Control.Concurrent.STM
8181import Control.Concurrent.STM.Stats (atomicallyNamed )
@@ -734,11 +734,14 @@ shakeShut recorder IdeState{..} = do
734734 -- request so we first abort that.
735735 cancelShakeSession runner
736736 void $ shakeDatabaseProfile shakeDb
737+ -- might hang if there are still running
738+ progressStop $ progress shakeExtras
739+ stopMonitoring
737740 case res of
738- Nothing -> logWith recorder Error $ LogTimeOutShuttingDownWaitForSessionVar 1
741+ Nothing -> do
742+ logWith recorder Error $ LogTimeOutShuttingDownWaitForSessionVar 1
743+ stopMonitoring
739744 Just _ -> pure ()
740- progressStop $ progress shakeExtras
741- stopMonitoring
742745
743746-- | This is a variant of withMVar where the first argument is run unmasked and if it throws
744747-- an exception, the previous value is restored while the second argument is executed masked.
You can’t perform that action at this time.
0 commit comments