Functions for manipulating a list of tasks #
IO.waitAny'
is a wrapper forIO.waitAny
that also returns the remaining tasks.List.waitAll : List (Task α) → Task (List α)
gathers a list of tasks into a task returning the list of all results.
Given a list of tasks, create the task returning the list of results, by waiting for each.
Equations
- List.waitAll [] = { get := [] }
- List.waitAll (task :: tasks_2) = Task.bind task (fun a => Task.map (fun as => a :: as) (List.waitAll tasks_2) Task.Priority.max) Task.Priority.max