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
- [].waitAll = { get := [] }
- (task :: tasks_2).waitAll = task.bind (fun (a : α) => Task.map (fun (as : List α) => a :: as) tasks_2.waitAll Task.Priority.max) Task.Priority.max