Displaying 2 results from an estimated 2 matches for "envs4".
Did you mean:
envs
2018 Sep 12
2
Environments and parallel processing
...at are normally passed by reference) that are returned from a child process. In particular, consider the following example:
library(parallel)
env1 <- new.env()
envs2 <- lapply(1:4, function(x) env1)
cl<-makeCluster(2, type="FORK")
envs3 <- parLapply(cl, 1:4, function(x) env1)
envs4 <- parLapply(cl, 1:4, function(x) capture.output(str(env1)))
stopCluster(cl)
First I make an environment (env1). Then using the non-parallel lapply I get a list (envs2) where all entries contain a pointer to env1. Now when using the parallel parLapply the entries in the list I get (envs3) conta...
2018 Sep 12
0
Environments and parallel processing
...e) that are returned from a child process. In particular, consider the following example:
> library(parallel)
> env1 <- new.env()
> envs2 <- lapply(1:4, function(x) env1)
>
> cl<-makeCluster(2, type="FORK")
> envs3 <- parLapply(cl, 1:4, function(x) env1)
> envs4 <- parLapply(cl, 1:4, function(x) capture.output(str(env1)))
> stopCluster(cl)
>
> First I make an environment (env1). Then using the non-parallel lapply I get a list (envs2) where all entries contain a pointer to env1. Now when using the parallel parLapply the entries in the list I get...