Description
A Future API for R is provided. In programming, a future is an
abstraction for a value that may be available at some point in the future.
The state of a future can either be unresolved or resolved. As soon as it is
resolved, the value is available. Futures are useful constructs in for instance
concurrent evaluation, e.g. parallel processing and distributed processing on
compute clusters. The purpose of this package is to provide a lightweight
interface for using futures in R. Functions 'future()' and 'value()' exist for
creating futures and requesting their values, e.g.
'f <- future({ mandelbrot(c(0.28,0), side=2) })' and 'v <- value(f)'.
The 'resolve()' function can be used to check if a future is resolved or not.
An infix assignment operator '%<=%' exists for creating futures whose values
are accessible by the assigned variables (as promises), e.g.
'v %<=% { mandelbrot(c(0.28,0), side=2) }'.
This package implements synchronous "lazy" and "eager" futures, and asynchronous
"multicore", "multisession" and ad hoc "cluster" futures. Additional types of
futures are provided by other packages enhancing this package.