This update to the parallel_pool_futures function to fall back on the spawn multiprocessing context method if the default fork method fails to run, which is most likely to happen on MacOS, although fortunately hasn't been seen to happen frequently with CIAO, and this update is in response to the first such instance reported through the helpdesk. While spawn is slower than fork, for the cases where parallel_pool_futures is [or can be] used in the CIAO scripts, the additional overhead to set up the parallelization with spawn will still be quicker than running the tasks serially (e.g. calculating the weighted source and background ARFs and RMFs simultaneously rather one-after-the-other).
This update also linted lingering whitespace in the code.
This update to the
parallel_pool_futures
function to fall back on thespawn
multiprocessing context method if the defaultfork
method fails to run, which is most likely to happen on MacOS, although fortunately hasn't been seen to happen frequently with CIAO, and this update is in response to the first such instance reported through the helpdesk. Whilespawn
is slower thanfork
, for the cases whereparallel_pool_futures
is [or can be] used in the CIAO scripts, the additional overhead to set up the parallelization withspawn
will still be quicker than running the tasks serially (e.g. calculating the weighted source and background ARFs and RMFs simultaneously rather one-after-the-other).This update also linted lingering whitespace in the code.