Happy-Algorithms-League / hal-cgp

Cartesian genetic programming (CGP) in pure Python.
GNU General Public License v3.0
28 stars 10 forks source link

Use `fork` as explicit context for `ProcessPoolExecutor` in test #356

Closed HenrikMettler closed 2 years ago

HenrikMettler commented 2 years ago

The reason for the the slow process startup time in OS11 (#349) for the ProcessPoolExecutor is the use default use of spawn as a start method on macOS (see: https://docs.python.org/3/library/multiprocessing.html). Explicitly setting the context as fork removes the issue.