The problem with this is that I can only run one program at a time (as wait literally waits before doing anything else) when I need to complete parallel tasks and react to task completion etc. I don't think wait can do this, but I may be wrong?
My other option is to create an independant hash table and provide each program a unique ID that it uses to store its status in the hash table. Then, I can just cycle over this hash key waiting for a change of status to what I'm looking for and continuing.. BUT - I'd rather find a more native way to do it..
Also, if I were to do it that way, does anyone know the most efficient way to keep checking for this hash change? I don't want to loop over it constantly as that would probably consume too much CPU.. Maybe set a sleep time within a loop - anyone have experience with anything along these lines?
Thanks again everyone.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.