The key idea is the eventloop and how it allocates time to the various widgets. You might want to experiment with sprinkiling
after variable updates which are needed elsewhere as signals.DoOneEvent(); # and or $mw->update;
Also, with threads shared variables, the main thread is NOT automagically updated with the shared variable changes. The shared variable must be actively read, for it to cross the thread boundary.
So if $STATE_of_MSGBOX_TIMER has changed in the thread, the main thread dosn't know about it, until it reads it once. If I understand your code idea, you are trying to use that in waitVariable, but it may not have been updated properly across the thread. So I don't know if a threads shared variable can be used across threads in waitVariable.
A quick hack to tell if that's the case, is to make a timer in the main thread, that automatically updates all shared vars frequently, like
that will force the main thread to read the shared var every 10 milliseconds.$mw->repeat( 10 , { my $dummy_var = $STATE_of_MSGBOX_TIMER });
Good luck.
In reply to Re^5: Perl/Tk repeat method, callback doesn't work if...
by zentara
in thread Perl/Tk repeat method, callback doesn't work if...
by NewMonkMark
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |