- or download this
use threads;
use Thread::Queue;
...
return ( $thread->tid() );
}
- or download this
my $tests = 7; # a number of tests
...
return $err_count;
}
- or download this
sub ALRM_handler {
alarm 0;
$Q->enqueue("DIEDIE");
$die = 1;
}
- 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