Learn R Programming

crew (version 0.5.0)

crew_controller_group: Create a controller group.

Description

Create an R6 object to submit tasks and launch workers through multiple crew controllers.

Usage

crew_controller_group(...)

Arguments

...

R6 controller objects or lists of R6 controller objects. Nested lists are allowed, but each element must be a control object or another list.

See Also

Other user: crew-package, crew_clean(), crew_controller_local(), crew_tls()

Examples

Run this code
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
persistent <- crew_controller_local(name = "persistent")
transient <- crew_controller_local(
  name = "transient",
  tasks_max = 1L
)
group <- crew_controller_group(persistent, transient)
group$start()
group$push(name = "task", command = sqrt(4), controller = "transient")
group$wait()
group$pop()
group$terminate()
}

Run the code above in your browser using DataLab