R/stopImplicitCluster2.R

#'Stop implicit cluster
#'
#'@export
stopImplicitCluster2 <- function() {
  options <- doParallel:::.options
  if (exists(".revoDoParCluster", where = options) &&
        !is.null(get(".revoDoParCluster", envir = options))) {
    parallel::stopCluster(get(".revoDoParCluster", envir = options))
    remove(".revoDoParCluster", envir = options)
  }
}
hoxo-m/pforeach documentation built on May 17, 2019, 4:53 p.m.