pyboreas
pyboreas copied to clipboard
Fix multiprocessing for Windows
In my case (and likely for many others), this script crashes on Windows.
Since the multiprocessing module uses spawn
instead of fork
on Windows, the globally defined _load_seq
isn't accessible in the child processes, preventing it from being pickled.
With the proposed fix, parallel loading works under Windows as well. Additionally, the code is shortened a bit :).