Displaying 1 result from an estimated 1 matches for "r_enable_forks".
2019 Apr 11
2
SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()
...)` is the default for
`parallel::mclapply()`, this will cause `mclapply()` to fall back to
`lapply()` avoiding _forked_ processing. However, this does not work
when the code specifies argument `mc.cores`, e.g. `mclapply(...,
mc.cores = detectCores())`.
SUGGESTION:
Introduce environment variable `R_ENABLE_FORKS` and corresponding R
option `enable.forks` that both take logical scalars. By setting
`R_ENABLE_FORKS=false` or equivalently `enable.forks=FALSE`,
`parallel::mclapply()` will fall back to `lapply()`.
For `parallel::mcparallel()`, we could produce an error if forks are disabled.
Comments?
/Henr...