File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ghcide/src/Development/IDE/Core Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ module Development.IDE.Core.Debouncer
11
11
import Control.Concurrent.Async
12
12
import Control.Concurrent.STM
13
13
import Control.Concurrent.STM.Stats (atomicallyNamed )
14
- import Control.Exception
15
14
import Control.Monad (join , void )
16
15
import Data.Hashable
17
16
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
49
(s,act) <- readTVar var
51
50
unsafeIOToSTM $ sleep s
52
- STM. delete k d
53
- return act
51
+ return $ do
52
+ atomically (STM. delete k d)
53
+ act
54
54
55
55
-- | Debouncer used in the DAML CLI compiler that emits events immediately.
56
56
noopDebouncer :: Debouncer k
You can’t perform that action at this time.
0 commit comments