resolve {future} | R Documentation |
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.
resolve(x, idxs = NULL, result = FALSE, value = result, recursive = 0, sleep = 1, progress = getOption("future.progress", FALSE), ...)
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. |
result |
If TRUE, the results are retrieved, otherwise not. |
value |
(DEPRECATED) Use argument 'result' instead. |
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 |
(DEPRECATED) If TRUE textual progress summary is outputted. If a
function, the it is called as |
... |
Not used |
This function is resolves synchronously, i.e. it blocks until x
and
any containing futures are resolved.
Returns x
(regardless of subsetting or not).
To resolve a future variable, first retrieve its
Future object using futureOf()
, e.g.
resolve(futureOf(x))
.