Within a Perl Tk script I am executing a number of after commands that may execute at the same time.
$me->get_top_frame()->after(3000,sub {$me->monitor_jobs()});
I need to restore some environment during each 'monitor_job' execution, so I need the other after cmds to wait till the current one is complete (there may be multiple monitor_jobs executing at the same time).
I was thinking that the 'after' command was executing separate threads so I was planning to use 'Thread::Semaphore' module however that seems to block.
Is Perl a thread language and if not, what is the Thread::Semaphore module for?
Does anyone have a suggestion on how to control the execution of the after commands so they do not over lap. I would really rather not have to have one scheduler controller for them. It was really nice being able to execute the after cmds independently.
Thanks in advance
Brian Miller
In reply to Perl TK and after cmd by brian42miller
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |