File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
ghcide/src/Development/IDE/Core Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -725,14 +725,14 @@ shakeSessionInit recorder ide@IdeState{..} = do
725725 logWith recorder Debug LogSessionInitialised
726726
727727shakeShut :: IdeState -> IO ()
728- shakeShut IdeState {.. } =
729- withMVar shakeSession $ \ runner -> do
730- -- Shake gets unhappy if you try to close when there is a running
731- -- request so we first abort that.
732- cancelShakeSession runner
733- void $ shakeDatabaseProfile shakeDb
734- progressStop $ progress shakeExtras
735- stopMonitoring
728+ shakeShut IdeState {.. } = do
729+ runner <- tryTakeMVar shakeSession
730+ -- Shake gets unhappy if you try to close when there is a running
731+ -- request so we first abort that.
732+ for_ runner cancelShakeSession
733+ void $ shakeDatabaseProfile shakeDb
734+ progressStop $ progress shakeExtras
735+ stopMonitoring
736736
737737
738738-- | This is a variant of withMVar where the first argument is run unmasked and if it throws
You can’t perform that action at this time.
0 commit comments