We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06d77cc commit ab90c30Copy full SHA for ab90c30
ghcide/src/Development/IDE/Core/Debouncer.hs
@@ -11,7 +11,6 @@ module Development.IDE.Core.Debouncer
11
import Control.Concurrent.Async
12
import Control.Concurrent.STM
13
import Control.Concurrent.STM.Stats (atomicallyNamed)
14
-import Control.Exception
15
import Control.Monad (join, void)
16
import Data.Hashable
17
import GHC.Conc (unsafeIOToSTM)
@@ -49,8 +48,9 @@ asyncRegisterEvent d delay k fire = join $ atomicallyNamed "debouncer - register
49
48
join $ atomicallyNamed "debouncer - sleep" $ do
50
(s,act) <- readTVar var
51
unsafeIOToSTM $ sleep s
52
- STM.delete k d
53
- return act
+ return $ do
+ atomically (STM.delete k d)
+ act
54
55
-- | Debouncer used in the DAML CLI compiler that emits events immediately.
56
noopDebouncer :: Debouncer k
0 commit comments