Won't this pound your CPU and disk by running in a tight loop?
Yes it does. Unfortunately the files have to get processed *immediately* so a cron job won't work here.
A bit more info would help here. A legacy third party app (of which I have no control over) drops a file into a directory and waits for the file to be processed by my Perl program. The Perl program processes the file and appends results to it before renaming the file to something the legacy app is expecting (the file extension is changed to .done). Once the legacy app sees the .done extension it knows processing is complete and it reads the processing results from the file. Behind that legacy app is a patient user waiting for their results hence the reason why the files must be processed immediately.
Seeing as I'm kinda stuck in legacy app hell, is there anything else my Perl daemon could do to aleviate the CPU & disk pounding here?
In reply to Re: Re: Daemon To Check For Files
by Anonymous Monk
in thread Daemon To Check For Files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |