Certain parallelization methods in R rely on forked processing, e.g.
parallel::makeCluster(n, type = "FORK"),
Process forking is done by the operating system and support for it in
R is restricted to Unix-like operating systems such as Linux, Solaris,
and macOS. R running on Microsoft Windows does not support forked
In R, forked processing is often referred to as "multicore" processing,
which stems from the 'mc' of the
mclapply() family of functions, which
originally was in a package named multicore which later was
incorporated into the parallel package.
This function checks whether or not forked (aka "multicore") processing
is supported in the current R session.
Internal usage only.
TRUE if forked processing is supported and not disabled, otherwise FALSE.
While R supports forked processing on Unix-like operating system such as Linux and macOS, it does not on the Microsoft Windows operating system.
For some R environments it is considered unstable to perform parallel
processing based on forking.
This is for example the case when using RStudio, cf.
RStudio Inc. recommends against using forked processing when running R from within the RStudio software.
This function detects when running in such an environment and returns
FALSE, despite the underlying operating system supports forked processing.
A warning will also be produced informing the user about this the first
time time this function is called in an R session.
This warning can be disabled by setting R option
parallelly.supportsMulticore.unstable, or environment variable
It is possible to disable forked processing for futures by setting R
option parallelly.fork.enable to
FALSE. Alternatively, one can
set environment variable
Analogously, it is possible to override disabled forking by setting one
of these to
## Check whether or not forked processing is supported supportsMulticore() #>  TRUE