Module tange::deferred

source ·
Expand description

Contains Deferred primitive and function definitions Defines the Deferred primitive

Structs

A Deferred is the core struct defining how computations are composed The type parameter indicates the type of data contained within the Deferred

Functions

batch_apply is a convenience method that takes a set of homogenous Deferreds and applies a function to each, returning a new set of Deferreds. Unlike Deferred::apply, batch_apply passes in an order index.
Often times, we want to combine a set of Deferred objects into a single Deferred. tree_reduce combines pairs of Deferred recursively using f, building a dependency tree which attempts to maximize parallelism.
tree_reduce_until is similar to tree_reduce except that it will stop reducing when the number of Deferreds left is less than or equal to parts.