Difference between queues and pipes in multiprocessing

Ethan Furman ethan at stoneleaf.us
Fri Sep 10 00:24:20 CEST 2010

Nobody wrote:
> 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).
Ah.  I was confusing it with os.pipe().  Many thanks.


More information about the Python-list mailing list