rx_domain: Create or run within a reactive domain

Description Usage Arguments Details Value

View source: R/time.R

Description

A reactive domain is an environment within which reactive constructs can run. Some objects like rx_exec automatically register themselves to be destroyed when the domain within which they were created is closed. This makes cleanup easier and prevents tasks from one "session" from bleeding into the next session.

Usage

1
rx_domain(expr)

Arguments

expr

The expression or code block to evaluate under the domain. If provided, the domain will automatically be closed before returning.

Details

This function can be used to either create and return a domain; or to evaluate an expression or code block under the domain, and close the domain when complete.

When passing expr, this function is reentrant.

Value

If expr is missing, a domain object; call the close() method on it to terminate the domain and clean up registered objects. If expr is provided, then the value of expr is returned.


jcheng5/rxtools documentation built on May 18, 2019, 10:22 p.m.