[Baypiggies] how to IPC with python on linux?

Ian Zimmerman itz at buug.org
Thu Dec 2 23:47:16 CET 2010

Brian> The easy answer is to use the multiprocessing package:
Brian> http://docs.python.org/library/multiprocessing.html

Heh.  I just tried to use multiprocessing for the first time for hgit,
my hg-to-git conversion program[1].  My rationale was probably similar
to that of jim's group or many other people, i.e. threads are a pain,
there's the GIL, etc.  But in the end I gave up and used threads.  The
trouble was that everything I sent over the IPC channel had to be
picklable, and worse, the target of a multiprocessing.Process cannot be
any callable (as it can for thrading.Thread), but only a module-level
function, i.e. no closures or instance methods.  These requirements
together would pretty much force me to make all the interesting data

[1] http://pypi.python.org/pypi/hgit/20101202

Ian Zimmerman <itz at buug.org>
gpg public key: 1024D/C6FF61AD 
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Ham is for reading, not for eating.

More information about the Baypiggies mailing list