Skip to contents

Evaluate an expression with daemons that last for the duration of the expression.

Usage

# S3 method for miraiDaemons
with(data, expr, ...)

Arguments

data

a call to daemons.

expr

an expression to evaluate.

...

not used.

Value

The return value of 'expr'.

Details

This function is an S3 method for the generic with for class 'miraiDaemons'.

Examples

if (interactive()) {
# Only run examples in interactive R sessions

with(
  daemons(2),
  {
    m1 <- mirai(Sys.getpid())
    m2 <- mirai(Sys.getpid())
    cat(call_mirai(m1)$data, call_mirai(m2)$data, "\n")
  }
)

status()

}