AsyncPlugin: Asynchronous Execution Capabilities

Description Super classes Methods

Description

Asyncrhonous programming utilities powered by {future} are available in this object, mainly supplied by the fiery::Fire object.

Documentation

Super classes

webtools::Configurable -> webtools::Plugin -> AsyncPlugin

Methods

Public methods

Inherited methods

Method new()

Create a new AsyncPlugin

Usage
AsyncPlugin$new()

Method exec()

Execute an expression in a different thread; the progress is checked at the end of each loop cycle.

Usage
AsyncPlugin$exec(name, expr, then, ...)
Arguments
name

(str) human-readable name for easy identification

expr

(exp) expression to execute asyncrhonously

then

(fun) when expr is evalated, handle with this funciton

...

(arg) extra arguments


Method exec_find()

Find async executions based on metadata

Usage
AsyncPlugin$exec_find(..., discard = FALSE)
Arguments
...

(arg) extra arguments

discard

(flg) if TRUE, then selected is discarded instead of kept


Method exec_remove()

Remove async executions

Usage
AsyncPlugin$exec_remove(..., discard = FALSE)
Arguments
...

(arg) extra arguments

discard

(flg) if TRUE, then selected is discarded instead of kept


Method time()

Execute an expression after a certain period of time.

Usage
AsyncPlugin$time(name, expr, then, after, ..., loop = FALSE)
Arguments
name

(str) human-readable name for easy identification

expr

(exp) expression to execute asyncrhonously

then

(fun) when expr is evalated, handle with this funciton

after

(num) seconds to wait until execution

...

(arg) extra arguments

loop

(flg) whether or not to keep looping (polling application)


Method time_find()

Find async time-delayed executions based on metadata

Usage
AsyncPlugin$time_find(..., discard = FALSE)
Arguments
...

(arg) extra arguments

discard

(flg) if TRUE, then selected is discarded instead of kept


Method time_remove()

Remove async executions

Usage
AsyncPlugin$time_remove(..., discard = FALSE)
Arguments
...

(arg) extra arguments

discard

(flg) if TRUE, then selected is discarded instead of kept


Method delay()

Execute an expression at the end of the cycle. Useful for just punting the cycle to the end in non-concurrent use cases.

Usage
AsyncPlugin$delay(name, expr, then, ...)
Arguments
name

(str) human-readable name for easy identification

expr

(exp) expression to execute asyncrhonously

then

(fun) when expr is evalated, handle with this funciton

...

(arg) extra arguments


Method delay_find()

Find async cycle-delayed executions based on metadata

Usage
AsyncPlugin$delay_find(..., discard = FALSE)
Arguments
...

(arg) extra arguments

discard

(flg) if TRUE, then selected is discarded instead of kept


Method delay_remove()

Remove async executions

Usage
AsyncPlugin$delay_remove(..., discard = FALSE)
Arguments
...

(arg) extra arguments

discard

(flg) if TRUE, then selected is discarded instead of kept


Method clone()

The objects of this class are cloneable with this method.

Usage
AsyncPlugin$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


tjpalanca/webtools documentation built on Dec. 23, 2021, 11 a.m.