Learn R Programming

future (version 1.10.0)

resolve: Resolve one or more futures synchronously

Description

This function provides an efficient mechanism for waiting for multiple futures in a container (e.g. list or environment) to be resolved while in the meanwhile retrieving values of already resolved futures.

Usage

resolve(x, idxs = NULL, value = FALSE, recursive = 0, sleep = 1,
  progress = getOption("future.progress", FALSE), ...)

Arguments

x

a list, an environment, or a list environment holding futures that should be resolved. May also be a single Future.

idxs

(optional) integer or logical index specifying the subset of elements to check.

value

If TRUE, the values are retrieved, otherwise not.

recursive

A non-negative number specifying how deep of a recursion should be done. If TRUE, an infinite recursion is used. If FALSE or zero, no recursion is performed.

sleep

Number of seconds to wait before checking if futures have been resolved since last time.

progress

If TRUE textual progress summary is outputted. If a function, the it is called as progress(done, total) every time a future is resolved.

Not used

Value

Returns x (regardless of subsetting or not).

Details

This function is resolves synchronously, i.e. it blocks until x and any containing futures are resolved.

See Also

To resolve a future variable, first retrieve its Future object using futureOf(), e.g. resolve(futureOf(x)).