Issue
Parallelization via forked processing should be avoided when running R from RStudio, cf.
rstudio/rstudio#2597 (comment). There are simply too many things that may break RStudio's interaction with R. Several RStudio users report on R sessions hanging and stray R processes that do not terminate. This is a problem that has been there from the beginning and it is a hard problem to solve so to the best of my knowledge it's unlikely that this will be "fixed" in RStudio any time soon.
In terms of the future ecosystem, this means that we should avoid using plan(multicore) when running R via RStudio.
Tasks
See also
Issue
Parallelization via forked processing should be avoided when running R from RStudio, cf.
rstudio/rstudio#2597 (comment). There are simply too many things that may break RStudio's interaction with R. Several RStudio users report on R sessions hanging and stray R processes that do not terminate. This is a problem that has been there from the beginning and it is a hard problem to solve so to the best of my knowledge it's unlikely that this will be "fixed" in RStudio any time soon.
In terms of the future ecosystem, this means that we should avoid using
plan(multicore)when running R via RStudio.Tasks
R_FUTURE_FORK_ENABLE=true/falsefuture.fork.enable = TRUE/FALSEsupportsMulticore()acknowledge these. When unset, try to infer automatically, e.g. disable when running on MS Windows or via RStudio. This will causemulticoreto fall back tosequentialwhen running in RStudio similarly to how it works when on MS Windows.help(multicore)supportsMulticore()See also