Skip to content

Commit d7d8d9f

Browse files
Update io-sim/src/Control/Monad/IOSim/Types.hs
Co-authored-by: Marcin Szamotulski <[email protected]>
1 parent 880fa47 commit d7d8d9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io-sim/src/Control/Monad/IOSim/Types.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ instance MonadCatch (STM s) where
336336

337337
-- STM actions are always run inside `execAtomically` and behave as if masked
338338
-- Another point to note that the default implementation of `generalBracket` needs
339-
-- mask, and is part of `MonadThrow`. For STM, it probably does not make sense to have
340-
-- masking.
339+
-- mask, and is part of `MonadThrow`. For STM, we don't need masking because
340+
-- async exceptions are handled outside of `execAtomically`.
341341
generalBracket acquire release use = do
342342
resource <- acquire
343343
b <- use resource `catch` \e -> do

0 commit comments

Comments
 (0)