worker_loop_callr | R Documentation |
Worker loop that pops a single task from the queue, executes the function in an external callr session and pushes the results. Supports timeouts on the tasks.
worker_loop_callr(fun, constants = NULL, rush)
fun |
( |
constants |
( |
rush |
(RushWorker) |
NULL
# This example is not executed since Redis must be installed
config_local = redux::redis_config()
rush = rsh(network_id = "test_network", config = config_local)
fun = function(x1, x2, ...) list(y = x1 + x2)
rush$start_local_workers(
fun = fun,
worker_loop = worker_loop_callr)
rush$stop_workers()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.