Help for this page

Select Code to Download


  1. or download this
    use threads::lite;
    my $factory = threads::line->new( -threads => 10 ); #reserve 10 thread
    +s
    
    my $x_thr = $factory->create( \&doX, \@Xargs, \%optional_configs );
    my $y_thr = $factory->create( \&doY, \@Yargs );
    
  2. or download this
    sub _default_thread {
       my $thr_id = shift;
    ...
       }
       else { sleep(1) }
    }