I have script that takes a very long time to run - hours, sometimes even days (even on a P2-2.8Ghz machine. After loading some data from a database at the beginning (less than a second), the script does no i/o until results are output at the end of script. I'd like to know how the script is progressing through its data, so I added some code to update the database at regular data intervals, but this has some problems:
        - database is remote, so script goes much slower with these status 
updates.
        - updates are based on data instead of clock.

I read something about threads in perl and was wondering if these status updates should be coded inside a thread so they have less impact on overall script performance. The number crunching could still go on while database update happens in separate thread.

To get updates based on clock instead of data... Are there tools within perl for using clock/timer information? Do I have to parse clock/timer info myself to make something happen every hour inside an existing loop?

I realise that my subject line might suggest use of cron, but this is not workable unless there is some way for two scripts to communicate with each other. If this could work, the processing script would probably still need a thread to do communication with timer script anyway.

Frank


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to