We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 880fa47 commit d7d8d9fCopy full SHA for d7d8d9f
io-sim/src/Control/Monad/IOSim/Types.hs
@@ -336,8 +336,8 @@ instance MonadCatch (STM s) where
336
337
-- STM actions are always run inside `execAtomically` and behave as if masked
338
-- 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.
+ -- mask, and is part of `MonadThrow`. For STM, we don't need masking because
+ -- async exceptions are handled outside of `execAtomically`.
341
generalBracket acquire release use = do
342
resource <- acquire
343
b <- use resource `catch` \e -> do
0 commit comments