in reply to Re: Re: Re: Re: Infinte perl script
in thread Infinte perl script
I've been taught (though it may be deprecated like lots of other things I've learned) that it's just bad manners for a program to basically waste time spinning madly, as you don't know what other apps might want to do with those cycles. If you sleep() you're letting the system decide what to do with those cycles you'd otherwise be wasting. Of course as others have already said, it depends on just how urgent your task is - do you need to act the same millisecond the file is deleted, or is 1/10 of a second fast enough (and don't forget your network latency is probably killing way more response time than the sleep() will).
Maybe if you explain your application a bit more fully the answer will become clearer.
--
I'd like to be able to assign to an luser
|
---|