Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://628787]
help
Chatterbox?
[stevieb]: so, it's -34c today, and some of my water pipes are frozen and one burst. sigh
[stevieb]: it doesn't seem as though "there's an app for that"
[ambrus]: burst water pipe sucks
[Corion]: ambrus: Ugh - yes, that really sucks!
[stevieb]: good thing is that both sides of the break are completely frozen, so I was able to shut off the water to the building before any water leaks. I told the landlord last year to insulate that specific area better
[Corion]: stevieb: Our SV overlords don't know what "frozen pipe" means and think it's something like "frozen yogurt"

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2016-12-08 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (144 votes). Check out past polls.