Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Pipes vs. temporary files

by bluto (Curate)
on Jul 25, 2007 at 20:33 UTC ( #628787=note: print w/replies, xml ) Need Help??

in reply to Pipes vs. temporary files

One issue with a pipe is that if the producer process dies, the consumer may wait forever on the pipe after processing part of the data. The benefit of a temporary file in this case is that you an ensure you have all of the data before processing it (i.e. by having the producer rename the file into the final name that the consumer expects). This may or may not matter to you.

Another problem with pipes is that if you use them on a single processor machine you may see a lot of context switching as the OS switches between the producer and consumer (i.e. each time the pipe is filled -- usually after about 4KB).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://628787]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-05-21 15:49 GMT
Find Nodes?
    Voting Booth?