Learn R Programming

crew (version 0.8.0)

crew_controller: Create a controller object from a client and launcher.

Description

This function is for developers of crew launcher plugins. Users should use a specific controller helper such as crew_controller_local().

Usage

crew_controller(client, launcher, auto_scale = NULL)

Arguments

client

An R6 client object created by crew_client().

launcher

An R6 launcher object created by one of the crew_launcher_*() functions such as crew_launcher_local().

auto_scale

Deprecated. Use the scale argument of push(), pop(), and wait() instead.

See Also

Other controller: crew_class_controller

Examples

Run this code
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
client <- crew_client()
launcher <- crew_launcher_local()
controller <- crew_controller(client = client, launcher = launcher)
controller$start()
controller$push(name = "task", command = sqrt(4))
controller$wait()
controller$pop()
controller$terminate()
}

Run the code above in your browser using DataLab