Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat problems will one see in using Python multiprocessing naively?
    text
    copied!<p>We're considering re-factoring a large application with a complex GUI which is isolated in a decoupled fashion from the back-end, to use the new (Python 2.6) multiprocessing module. The GUI/backend interface uses Queues with Message objects exchanged in both directions.</p> <p>One thing I've just concluded (tentatively, but feel free to confirm it) is that "object identity" would not be preserved across the multiprocessing interface. Currently when our GUI publishes a Message to the back-end, it expects to get the same Message back with a result attached as an attribute. It uses object identity (<code>if received_msg is message_i_sent:</code>) to identify returning messages in some cases... and that seems likely not to work with multiprocessing.</p> <p>This question is to ask what "gotchas" like this you <em>have seen in actual use</em> or <em>can imagine one would encounter</em> in naively using the multiprocessing module, especially in refactoring an existing single-process application. Please specify whether your answer is based on actual experience. Bonus points for providing a usable workaround for the problem.</p> <p><strong>Edit:</strong> Although my intent with this question was to gather descriptions of problems <em>in general</em>, I think I made two mistakes: I made it community wiki from the start (which probably makes many people ignore it, as they won't get reputation points), and I included a too-specific example which -- while I appreciate the answers -- probably made many people miss the request for general responses. I'll probably re-word and re-ask this in a new question. For now I'm accepting one answer as best merely to close the question as far as it pertains to the specific example I included. Thanks to those who did answer!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload