-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Milestone
Description
Hi,
I'm trying to launch some processes that can sometimes throw a segfault (And this can't be predicted or modified since I don't have the source code).
This MWE code is behaving has I want using future::multiprocess plan (i.e., return 40 in the last line).
future::plan(future::multiprocess,
workers = 2)
segfault <- function() {
system('kill -11 $PPID')
}
processes <- c()
for (i in seq(1, 40)) {
if (i == 20) {
processes <- c(processes, withCallingHandlers({ future::future({segfault()}, lazy = TRUE, earlySignal=FALSE) }, error=function(...) {}))
} else {
processes <- c(processes, future::future({ Sys.sleep(2); i }, lazy = TRUE, earlySignal=FALSE))
}
}
future::resolve(processes)
future::value(processes[[40]])But, this MWE code is not behaving has I want using future.callr::callr plan (i.e., throw Error in readRDS(res) : error reading from connection).
future::plan(future.callr::callr,
workers = 2)
segfault <- function() {
system('kill -11 $PPID')
}
processes <- c()
for (i in seq(1, 40)) {
if (i == 20) {
processes <- c(processes, withCallingHandlers({ future::future({segfault()}, lazy = TRUE, earlySignal=FALSE) }, error=function(...) {}))
} else {
processes <- c(processes, future::future({ Sys.sleep(2); i }, lazy = TRUE, earlySignal=FALSE))
}
}
future::resolve(processes)
future::value(processes[[40]])Is it normal or do you have any idea why ?
Note that I'm using future v1.15.1 and future.callr v0.5.0.
Metadata
Metadata
Assignees
Labels
No labels