Help for this page

Select Code to Download


  1. or download this
    use threads;    
    use Thread::Queue;
    ...
    
        return ( $thread->tid() );
    }
    
  2. or download this
    my $tests = 7; # a number of tests
    
    ...
    
        return $err_count;
    }
    
  3. or download this
    sub ALRM_handler {
        alarm 0;
        $Q->enqueue("DIEDIE");
        $die = 1;
    }
    
  4. or download this
    my $time = 3600; #or some number of seconds
    
    ...
    my $err_count = recv_results();
    
    $die = 1;    #this will force any threads that are still stuck in the 
    +while loop to exit