# Register an async evaluator based on future (the provided mirai backend is
# superior in every way so this is for illustrative purpose)
future_async <- function(...) {
function(expr, envir) {
promises::future_promise(
expr = expr,
envir = envir,
substitute = FALSE,
...
)
}
}
register_async("future", future_async, c("promises", "future"))
Run the code above in your browser using DataLab