plumber supports async request handling in two ways. Either manual by
returning a promise from the handler, or automatic through the @async
tag /
async
argument in the handler functions. The
default evaluator is controlled by the plumber2.async
option or the
PLUMBER2_ASYNC
environment variable.
Usage
register_async(name, fun, dependency = NULL)
show_registered_async()
get_async(name = NULL, ...)
Arguments
- name
The name of the evaluator
- fun
A function that, upon calling it returns an evaluator taking an
expr
andenvir
argument. See the async evaluator functions for examples- dependency
Package dependencies for the evaluator.
- ...
Arguments passed on to the async function creator