# NOT RUN {
require("doRedis")
registerDoRedis("work queue")
startLocalWorkers(n=1, queue="work queue")
f <- function() pi
foreach(1) %dopar% eval(call("f"))
# Returns the error:
# Error in eval(call("f")) : task 1 failed - could not find function "f"
# Manuall export the symbol f:
setExport("f")
foreach(1) %dopar% eval(call("f"))
# Ok then.
#[[1]]
#[1] 3.141593
removeQueue("work queue")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab