Learn R Programming

future (version 0.12.0)

resolve: Wait until all existing futures in an environment are resolved

Description

The environment is first scanned for futures and then the futures are polled until all are resolved. When a resolved future is detected its value is retrieved (optionally). This provides an efficient mechanism for waiting for a set of futures to be resolved and in the meanwhile retrieving values of already resolved futures.

Usage

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

Arguments

x
an environment holding futures.
idxs
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 infintive 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).

See Also

futureOf