ClusterFuture blocking

I'm trying to get a long running, embarrassing parallel analysis using snow and future to run asynchronously. But, the ClusterFuture is blocking, simplified code below. Is there a way to keep ClusterFuture from blocking? Or am I just doing something wrong? Running R version 3.5.3 on 64 bit Windows (and eventually on Linux as well).

thanks
Mark

rm(list=ls())
RunNM2 <- function(index){
Sys.sleep(4)
return(index)
}
library(tictoc)
library(future)
library(snow)
cl <- future::makeClusterPSOCK(rep("localhost",8),makeNode = makeNodePSOCK)
plan(cluster, workers = cl)
tic("cluster")
res.1 <- ClusterFuture(parLapply(cl,1:8,RunNM2),worker=cl )

blocks here

res <- value(res.1)
toc()
stopCluster(cl)
rm(cl)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.