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