Skip to contents

These functions support async request handling. You can register your own as well using register_async().

Usage

future_async(...)

mirai_async(...)

Arguments

...

Further argument passed on to the internal async function. See Details for information on which function handles the formatting internally in each async evaluator

Value

A function taking expr and envir. The former is the expression to evaluate and the latter is an environment with additional variables that should be made available during evaluation

Provided evaluators

  • future_async() uses promises::future_promise(). It is registered as "future". Be aware that for this evaluator to execute asynchronously you need to set a different planner than the default. See future::plan().

  • mirai_async() uses mirai::mirai(). It is registered as "mirai". Be aware that for this evaluator to be performant you should start up multiple persistent background processes. See mirai::daemons().