Help for this page

Select Code to Download


  1. or download this
    foreach $task (@tasks) {
     $task->do_one_task()
    };
    
  2. or download this
    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
    };
    
  3. or download this
     call_with_timeout(mysubroutine,$low_timeout);
    
  4. or download this
      $self->MagicallyRecallState(); # and jump to the correct
              #codeblock
    ...
        $self->SaveState() && return;
       $sth->method();
    };
    
  5. or download this
      for (0..int(rand(1000))) {
        sleep(int(rand(10)));# this takes at most 10s  
     };