in reply to Deep recursion in Tk repeat

I'm not sure I understand your code, but why not just arrange for $taxis->taxis to immediately return if another instance is already running?

my $RUNNING = 0; $mw->repeat( 50 => sub { $taxis->taxis(\$RUNNING) unless $RUNNING} ]; MainLoop; package taxis; sub taxis { my ($self, $r_running, @whatever, ) = @_; $mw->update; $$r_running = 1; # do other stuff that takes a while $$r_running = 0; return; }
Of course, this must be modified if $taxis->taxis is recursive.
sub taxis { my ($self, $r_running, @whatever, ) = @_; $mw->update; $$r_running = 1; # other stuff my $null = 0; $self->taxis(\$null, $whatever); $$r_running = 0; return; }
....I think.....

--Bob Niederman, http://bob-n.com

All code given here is UNTESTED unless otherwise stated.