title: How to convert Python threading code to multiprocessing code?
body: <p>I need to convert a <code>threading</code> application to a <code>multiprocessing</code> application for multiple reasons (GIL, memory leaks). Fortunately the threads are quite isolated and only communicate via <code>Queue.Queue</code>s. This primitive is also available in <code>multiprocessing</code> so everything looks fine. Now before I enter this minefield I'd like to get some advice on the upcoming problems:</p>
  
  <ol>
  <li>How to ensure that my objects can be transfered via the <code>Queue</code>? Do I need to provide some <code>__setstate__</code>?</li>
  <li>Can I rely on <code>put</code> returning instantly (like with <code>threading</code> <code>Queue</code>s)?</li>
  <li>General hints/tips?</li>
  <li>Anything worthwhile to read apart from the <a href="http://docs.python.org/library/multiprocessing.html" rel="nofollow">Python documentation</a>?</li>
  </ol>