Import std.concurrent.tasks
WhenAll
function
Public Function WhenAll<T>(tasks: Task<T>[]): Task<T[]>
A Task of each task's result, in their order, done once they all are.
Examples
Local tasks = [Spawn(Function() => 1 + 1), Spawn(Function() => 2 + 2)]
Expect(WhenAll(tasks).Wait() == [2, 4])function
Public Function WhenAll(tasks: Task[]): Task
A Task that's done once each of the tasks is.
function
Public Function WhenAll<T, E: Error>(tasks: (Task<T> Throws E)[]): (Task<T[]> Throws E)
A Task of each task's result, in their order, done once they all are; when any throws, it waits for the rest and then throws the error of the first of them, in their order, that threw.
function
Public Function WhenAll<E: Error>(tasks: (Task Throws E)[]): (Task Throws E)
A Task that's done once each of the tasks is, which throws the first's error, in their order,
when any throw.
Report an issue with this page or with FutureBlitz on GitHub.