A Delayed version of a function may be called to generate Delayed objects

delayed(expr, sequential = FALSE, expect_error = FALSE, timeout = NULL)

delayed_fun(fun, sequential = FALSE, expect_error = FALSE)

## Arguments

expr expression to delay if TRUE, never parallelize this task if TRUE, pass error to downstream tasks instead of specify a time limit for computation halting computation function to delay

## Examples

d <- delayed(3 + 4)
d$compute() #> [1] 7adder <- function(x, y) { x + y } delayed_adder <- delayed_fun(adder) z <- delayed_adder(3, 4) z$compute()
#> [1] 7