R/stopImplicitCluster2.R

#' Stop implicit cluster
#' @import parallel
#' @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)
  }
}
ymattu/mforeach documentation built on May 20, 2019, 9:44 a.m.