Add generic function cloneNode() with implementation for RichSOCKnode, e.g.
library(parallelly)
cl <- makeClusterPSOCK(2L)
node <- cl[[2]]
node
## node of a socket cluster on host 'localhost' with pid 1256882
another_node <- cloneNode(node)
another_node
## node of a socket cluster on host 'localhost' with pid 1256886
cl <- c(cl, another_node)
This would make it possible to restart crashed workers, e.g.
for (kk in seq_along(cl)) {
node <- cl[[kk]]
if (!isNodeAlive(node)) {
node <- cloneNode(node)
cl[[kk]] <- node
}
}
For this to work, the RichSOCKnode object needs to record all details on how it was launched.
Add generic function
cloneNode()
with implementation for RichSOCKnode, e.g.This would make it possible to restart crashed workers, e.g.
For this to work, the
RichSOCKnode
object needs to record all details on how it was launched.