foreach $task (@tasks) { $task->do_one_task() }; #### foreach $task (@tasks) { $task->do_one_task(); pong(); # Report back to Event::Stats that I'm # still alive and that it should reset it's timer }; #### call_with_timeout(mysubroutine,$low_timeout); #### $self->MagicallyRecallState(); # and jump to the correct #codeblock foreach $sth (@sth) { $self->SaveState() && return; $sth->method(); }; #### for (0..int(rand(1000))) { sleep(int(rand(10)));# this takes at most 10s };