pch_clean_up: pch_clean_up

View source: R/pch_clean_up.R

pch_clean_upR Documentation

pch_clean_up

Description

Parallel computing helper function to clean up the parallel backend.

Usage

pch_clean_up(cl)

Arguments

cl

A cluster object of class c("SOCKcluster", "cluster").

Value

The function returns nothing. Internally, it calls parallel::stopCluster() and foreach::registerDoSEQ().

See Also

parallel::stopCluster(), foreach::registerDoSEQ()

Examples

if (require("doParallel") && require("foreach")) {
  cl <- pch_register_parallel(pch_check_available_cores(2))
  pch_clean_up(cl)
}

kdry documentation built on July 4, 2024, 9:07 a.m.

Related to pch_clean_up in kdry...