A backend runs child sessions: start(spec, ctx) returns a handle the reactor can poll,
cancel(handle) stops it and every process it started. Backends never block the reactor for
more than 50 ms.
Usage
gptr_backend(name, start, poll = NULL, cancel, capabilities = list())
Arguments
- name
Backend name, usable as backend = <name>.
- start
function(spec, ctx).
- poll
function(handle) or NULL.
- cancel
function(handle).
- capabilities
Named list: parallel, live_objects, ask.
Value
A spec of class c("gptr_backend", "gptr_spec").
Examples
gptr_backend("echo", start = function(spec, ctx) NULL, cancel = function(handle) NULL)
#> <gptr_backend echo>
#> start: <fn>
#> cancel: <fn>
#> capabilities: <list of 0>
#> api_version: 1.0