I need to convert a threading application to a multiprocessing application for multiple reasons (GIL, memory leaks). Fortunately the threads are quite isolated and only communicate via Queue.Queues. This primitive is also available in multiprocessing so everything looks fine. Now before I enter this minefield I'd like to get some advice on the upcoming problems:
- How to ensure that my objects can be transfered via the
Queue? Do I need to provide some__setstate__? - Can I rely on
putreturning instantly (like withthreadingQueues)? - General hints/tips?
- Anything worthwhile to read apart from the Python documentation?
subclass(Process).__init__is a problem. :-/