diff --git a/Control/Concurrent/Async/Internal.hs b/Control/Concurrent/Async/Internal.hs index 11e3432..e6716ca 100644 --- a/Control/Concurrent/Async/Internal.hs +++ b/Control/Concurrent/Async/Internal.hs @@ -298,6 +298,8 @@ cancel a@(Async t _) = throwTo t AsyncCancelled <* waitCatch a -- | Cancel multiple asynchronous actions by throwing the @AsyncCancelled@ -- exception to each of them in turn, then waiting for all the `Async` threads -- to complete. +-- +-- @since 2.2.5 cancelMany :: [Async a] -> IO () cancelMany as = do mapM_ (\(Async t _) -> throwTo t AsyncCancelled) as