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 non-empty list of tasks, wait for the first to complete. Return the value and the list of remaining tasks.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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