if (.Platform$OS.type != "windows" || interactive()) {
cl <- makeClusterPSOCK(2)
print(isNodeAlive(cl)) ## [1] TRUE TRUE
res <- killNode(cl)
print(res)
## It might take a moment before the background
## workers are shutdown after having been signaled
Sys.sleep(1.0)
print(isNodeAlive(cl)) ## [1] FALSE FALSE
}
Run the code above in your browser using DataLab