- or download this
sub worker_thread
...
{
$thread -> join();
}
- or download this
my $thread_exclusion = Thread::Semaphore -> new ( -1 * $nthreads + 1
+ );
- or download this
$thread_exclusion -> up();
- or download this
sub close_queues
{
$exclusion_lock -> down();
$process_q -> end();
}
- or download this
$SIG{'ALRM'} = \&close_queues();
alarm ( 60 );