diff --git a/R/master.r b/R/master.r index 4b116fe..d3ada08 100644 --- a/R/master.r +++ b/R/master.r @@ -33,7 +33,7 @@ master = function(pool, iter, rettype="list", fail_on_error=TRUE, n_warnings = 0 shutdown = FALSE kill_workers = FALSE - penv = pool$env() + penv = pool$env(work_chunk=work_chunk) obj_size = structure(sum(penv$size), class="object_size") obj_size_fmt = format(obj_size, big.mark=",", units="auto") @@ -89,8 +89,8 @@ master = function(pool, iter, rettype="list", fail_on_error=TRUE, if (submit_index[1] <= n_calls) { # if we have work, send it to the worker submit_index = submit_index[submit_index <= n_calls] - pool$send(clustermq:::work_chunk(chunk, fun=fun, const=const, - rettype=rettype, common_seed=common_seed), chunk=chunk(iter, submit_index)) + pool$send(work_chunk(chunk, fun=fun, const=const, rettype=rettype, + common_seed=common_seed), chunk=chunk(iter, submit_index)) jobs_running = jobs_running + length(submit_index) submit_index = submit_index + chunk_size