Closed SPKorhonen closed 7 years ago
Billiard Pool uses nested class Process to add boolean attribute controlledtermination to process class. When starting worker processes, if no fork support is available (which is the case under Windows), the process state is pickled which in turn fails with "AttributeError: Can't pickle local object 'Pool.init__.
Corresponding issue is #226. Also, for additional discussion about this issue, see https://github.com/celery/celery/issues/3821
For test, should just add a minimal test which tries to create Pool object under windows? Is this sufficient and/or sensible?
yes provide a test that help us reproduce the issue :)
I've added rather rudimentary test but it get the job done. It reproduces the problem and allows for checking of the fix
As there is no fork support on windows pickle is used to transfer the process state. Unfortunately pickle can't handle nested classes causing a crash. FIX: Moved one boolean variable to process instance variable and removed nested class from pool