Difference between queues and pipes in multiprocessing

Nobody nobody at nowhere.com
Thu Sep 9 17:03:59 EDT 2010


On Thu, 09 Sep 2010 12:23:17 -0700, Ethan Furman wrote:

>> basically a Queue is a syncronization primitive used to
>> share and pass data to and from parent/child processes.
>> 
>> A pipe is as the name suggests, a socket pair connected
>> end-to-end allowing for full-duplex communications.
>> 
> 
> Isn't a pipe's communications one-way, requiring two of them to achieve 
> full-duplex?

He's talking about multiprocessing.Pipe(), not a Unix pipe.

On Unix, multiprocessing.Pipe() uses a socket pair if duplex==True and a
pipe if duplex==False. On Windows it uses a named pipe (which can be
either unidirectional or bidirectional).




More information about the Python-list mailing list