tmp = makeRegistry(file.dir = NA, make.default = FALSE)
batchMap(function(x) x^2, x = 1:10, reg = tmp)
submitJobs(reg = tmp)
waitForJobs(reg = tmp)
reduceResults(function(x, y) c(x, y), reg = tmp)
reduceResults(function(x, y) c(x, sqrt(y)), init = numeric(0), reg = tmp)
Run the code above in your browser using DataLab