multiprocessing vs. asyncio.SubprocessProtocol

Charles Hixson charleshixsn at
Thu Jul 31 21:00:43 CEST 2014

What are the tradeoffs between using multiprocessing vs. using 
This only one that I've noticed is that asyncio seems to require much 
more hands-on management of message queueing.  OTOH, I'm no expert in 
either of them, and I might be missing something that will bite me later.

OTOH, I could do the whole thing with a TCP/IP peer-to-peer setup on 
localhost.  And that's much easier to figure out.  (Each process has one 
input queue, and runs until it receives a message telling it to die.  
JSON is all I need for serialization...though ast.literal_eval would 
work as well.)

So I guess I also want to know whether there's any advantage in using 
multiprocessing vs using a datagram transmission over localhost.  (That 
clearly has the advantage that it makes it easier to grow to multiple 

More information about the Python-list mailing list