in reply to Tk::repeat function
In cases like this, I generally use some kind of flag to prevent more than one instance from running at a time.
my $is_refreshing = 0; $autorefresh_id = $root->repeat($rinterval*60000,\&refresh_func); sub refresh_func { return if $is_refreshing; $is_refreshing = 1; ... #long running routine ... $is_refreshing = 0; }
You just need to make sure to reset the sentinal flag anywhere the routine can exit.
|
|---|