Automatically Stop a Cluster when Garbage Collected
Registers a finalizer to a cluster such that the cluster will be stopped when garbage collected
autoStopCluster(cl, debug = FALSE)
cl |
A cluster object created by for instance |
debug |
If TRUE, then debug messages are produced when the cluster is garbage collected. |
The cluster object with attribute gcMe
set.
The cluster is stopped using
stopCluster(cl)
.
options(parallelly.debug = TRUE) cl <- makeClusterPSOCK(2, dryrun = TRUE) cl <- autoStopCluster(cl) print(cl) rm(list = "cl") gc()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.