multiprocessing uses daemonic processes. POSIX doesn't allow daemonic processes to have children, i.e. you can't nest multiprocessing pools. This tests if the current process is a daemonic process, and if so, uses a dummy pool using threads instead. Due to the GIL, using multiple threads won't make this faster, unless DeepLC would be IO-bound.
multiprocessing
uses daemonic processes. POSIX doesn't allow daemonic processes to have children, i.e. you can't nest multiprocessing pools. This tests if the current process is a daemonic process, and if so, uses a dummy pool using threads instead. Due to the GIL, using multiple threads won't make this faster, unless DeepLC would be IO-bound.