# Only run if a Redis server is running
if (redux::redis_available()) {
# Start a single local R worker process
startLocalWorkers(n=1, queue="jobs", linger=1)
# Register the work queue with the coordinator R process
registerDoRedis("jobs")
# Compare verbose task submission output from...
setChunkSize(1)
foreach(j=1:4, .combine=c, .verbose=TRUE) %dopar% j
# with the verbose task submission output from:
setChunkSize(2)
foreach(j=1:4, .combine=c, .verbose=TRUE) %dopar% j
# Clean up
removeQueue("jobs")
}
Run the code above in your browser using DataLab