@@ -788,6 +788,8 @@ gbracketIO bef exc aft (Unfold estep einject) (Unfold step1 inject1) =
788788 where
789789
790790 inject x = do
791+ -- Mask asynchronous exceptions to make the execution of 'bef' and
792+ -- the registration of 'aft' atomic. See comment in 'D.gbracketIO'.
791793 (r, ref) <- liftBaseOp_ mask_ $ do
792794 r <- bef x
793795 ref <- D.newFinalizedIORef (aft r)
@@ -1040,6 +1042,8 @@ bracketIO bef aft (Unfold step1 inject1) = Unfold step inject
10401042 where
10411043
10421044 inject x = do
1045+ -- Mask asynchronous exceptions to make the execution of 'bef' and
1046+ -- the registration of 'aft' atomic. See comment in 'D.gbracketIO'.
10431047 (r, ref) <- liftBaseOp_ mask_ $ do
10441048 r <- bef x
10451049 ref <- D.newFinalizedIORef (aft r)