@@ -788,6 +788,8 @@ gbracketIO bef exc aft (Unfold estep einject) (Unfold step1 inject1) =
790 inject x = do
790 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'.
791 (r, ref) <- liftBaseOp_ mask_ $ do
793 (r, ref) <- liftBaseOp_ mask_ $ do
792 r <- bef x
794 r <- bef x
793 ref <- D.newFinalizedIORef (aft r)
795 ref <- D.newFinalizedIORef (aft r)
@@ -1040,6 +1042,8 @@ bracketIO bef aft (Unfold step1 inject1) = Unfold step inject
1042 inject x = do
1044 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'.
1043 (r, ref) <- liftBaseOp_ mask_ $ do
1047 (r, ref) <- liftBaseOp_ mask_ $ do
1044 r <- bef x
1048 r <- bef x
1045 ref <- D.newFinalizedIORef (aft r)
1049 ref <- D.newFinalizedIORef (aft r)