Hello all,
I understand that forking (which is done by mclapply()
, as well as future::plan(multicore)
) can cause hanging and other issues when used in RStudio. Some background on that:
- parallel:mclapply in Rstudio cause hanging rsessions · Issue #2597 · rstudio/rstudio · GitHub
- Protect against using forked processes (aka "multicore") in RStudio · Issue #299 · HenrikBengtsson/future · GitHub
However, there was a question several years ago about whether this is only when running code in the RStudio console, or whether it also applies to scripts run in the RStudio terminal or with the Jobs tab. The future
maintainer (Henrik Bengtsson) asked this question here in 2019, but I don't see a clear answer anywhere on that thread.
I brought this back up with Henrik this week (April 2023) and he replied that he still doesn't have a clear answer on this.
Does anyone else have an idea what's going on here, and more importantly, whether it is safe to fork in the Jobs or Terminal from with RStudio?
(Specifically, I'm using RStudio Server on Linux, though I'm not sure if that's relevant to the more general question.)