Description Usage Arguments Value Examples
View source: R/parallel.destroy.R
Attempt to kill the specified parallel cluster. Might have unexpected side effects when using the kill all command.
1 | parallel.destroy(cl = NULL, destroy = FALSE)
|
cl |
Type: cluster or integer. A parallel cluster. When it is a number, creates a cluster with the specified number of parallel clusters. Defaults to |
destroy |
Type: logical. Whether to attempt to destroy any cluster. Might have side effects. Defaults to |
TRUE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# Cannot pass CRAN checks. Disabled.
library(parallel)
# Generate 2 useless clusters of 8 threads
cl <- parallel::makeCluster(8)
cl <- parallel::makeCluster(8)
# Attempts to stop the second cluster
parallel.destroy(cl)
# Kills any clusters
parallel.destroy(destroy = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.