Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict;
    ...
    
    print "Main waiting for threads to die";
    $_->join for @workers;
    
  2. or download this
    [16:03:44.95] c:\test>ThreadPoolExample -WORKERS=4 -ITEMS=20 -MAXWORK=
    +1
    Thread: 1 started
    ...
    Thread: 1 processing workitem 0.765777587890625
    Thread: 1 ended
    Thread: 4 ended