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.Queue
s. 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
put
returning instantly (like withthreading
Queue
s)? - General hints/tips?
- Anything worthwhile to read apart from the Python documentation?