Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict;
    ...
        sleep 1 while threads->list( threads::running ) > $MAX;
    }
    $_->join for @threads;
    
  2. or download this
    #! perl -slw
    use strict;
    ...
    
    $Q->enqueue( (undef) x $MAX );
    $_->join for @threads;