Task

yield_many/2

yield_many(tasks, opts \\ [])

Waits for all the given %Task{}s to finish and returns a list of {task, result} tuples, in the same order as the tasks.

When opts is a timeout (a non-negative integer), tasks that don’t complete within that many milliseconds get nil as their result and keep running.

Options

opts can be either a timeout or a keyword list.

When acting as a timeout, it is the maximum amount of time (in milliseconds) each task is allowed to execute for. Defaults to 5000. It can also be :infinity to wait forever.

When acting as a keyword list, it accepts the following options: