Does forking work correctly in RStudio terminal and jobs runner?

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:

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.)


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.