You can have a look here: https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing-programming 223
Note that Windows can still cause issues here, be it pickling errors or slow performance. See https://github.com/pytorch/pytorch/issues/12831 130. The safest approach is using 0 on Windows.