pch_clean_up {kdry}R 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)
}

[Package kdry version 0.0.2 Index]