simonmar / async

Run IO operations asynchronously and wait for their results
BSD 3-Clause "New" or "Revised" License
323 stars 65 forks source link

`concurrently` for many actions #112

Closed marcosh closed 4 years ago

marcosh commented 4 years ago

concurrently now provides the ability to perform two actions concurrently.

Would it be something useful to expose a function to perform many actions concurrently?

concurrentlyMany :: [IO a] -> IO [a]

or even something a bit more general

concurrentlyMany :: (Foldable t, ...) => t (IO a) -> IO (t a)

marcosh commented 4 years ago

I realised this could already be done with mapConcurrently id