https://statcompute.wordpress.com/2019/06/30/parallel-r-socket-or-fork
2 implementations of parallelism in the package parallel.
-
fork: each parallel thread is a complete duplication of the master process with the shared environment, including objects or variables defined prior to the kickoff of parallel threads. Fast, but doesn’t work on Windows.
-
socket: each thread runs separately without sharing objects or variables, which can only be passed from the master process explicitly. Slower, but works on all operating systems.