Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Control/Concurrent/Async/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ race_ ::
-- > withAsync left $ \a ->
-- > withAsync right $ \b ->
-- > waitBoth a b
--
-- To run more than two actions concurrently, refer to the documentation
-- of 'mapConcurrently'.
concurrently ::
CALLSTACK
IO a -> IO b -> IO (a,b)
Expand Down Expand Up @@ -764,6 +767,12 @@ concurrently_ left right = concurrently' left right (collect 0)
--
-- > pages <- mapConcurrently getURL ["url1", "url2", "url3"]
--
-- A list of tasks can also be given, to run more than two functions
-- 'concurrently':
--
-- > runAllConcurrently = mapConcurrently id
-- > results <- runAllConcurrently [fun1, fun2, fun3]
--
-- Take into account that @async@ will try to immediately spawn a thread
-- for each element of the @Traversable@, so running this on large
-- inputs without care may lead to resource exhaustion (of memory,
Expand Down