powered by
Sends a task to a specific worker and waits for the result.
pool_dispatch( worker_id, expr, envir = parent.frame(), pool = NULL, timeout = 3600 )
The result of evaluating expr in the worker.
Integer. Worker to dispatch to.
Expression to evaluate.
Environment containing variables needed by expr.
A shard_pool object. If NULL, uses the current pool.
shard_pool
Numeric. Seconds to wait for result (default 3600).
# \donttest{ p <- pool_create(2) pool_dispatch(1, quote(1 + 1), pool = p) pool_stop(p) # }
Run the code above in your browser using DataLab