Created attachment 2111 [details]
Patch to src/library/parallel
For processing in parallel a large amount of data or running parallel routines (such as simulations) that take a long time, it can be helpful to have a means of monitoring progress through the task. The attached patch to parallel::clusterApply, clusterApplyLB, and clusterMap adds a hook for an optional closure to enable external tracking of progress, such as with a txtProgressBar. The closure is called as the results from parallel workers are processed.
Created attachment 2112 [details]
Revised patch to src/library/parallel
This revised patch provides more timely progress updating when results to statistcClusterApply() come in at different times (even though users would likely be better served with the *LB versions). Also simplifies the .progress function specification (no arguments).
Created attachment 2114 [details]
mc version of patch to src/library/parallel
This second patch provides an analogous implementation for mclapply.