cloneNode: Clone one or more nodes

View source: R/cloneNode.R

cloneNodeR Documentation

Clone one or more nodes

Description

Clone one or more nodes

Usage

cloneNode(x, ...)

Arguments

x

A cluster node or a cluster.

...

Optional arguments overriding the recorded ones.

Value

An object of class class(x).

Examples


cl <- makeClusterPSOCK(2)
print(cl)

## Terminate the second cluster node
parallel::stopCluster(cl[2])

## Show that cluster node #2 is no longer alive (wait a bit first)
Sys.sleep(1.0)
print(isNodeAlive(cl))
print(cl)

## "Restart" it
cl[2] <- cloneNode(cl[2])
print(cl)

## Check all nodes
print(isNodeAlive(cl))



parallelly documentation built on Sept. 11, 2024, 7:56 p.m.