Help for this page

Select Code to Download


  1. or download this
    9,10c9,10
    < use threads;
    ...
    < my @workers = map threads->create(\&process_file), 1 .. $threads;
    ---
    > my @workers = map MCE::Child->create(\&process_file), 1 .. $threads;
    
  2. or download this
    # threads, Thread::Queue
    
    ...
    real  0m9.035s
    user  0m56.504s
    sys   0m1.097s
    
  3. or download this
    Parsing 35841 files
    maxforks: 8
    ...
    real  0m8.953s
    user  0m52.559s
    sys   0m1.006s
    
  4. or download this
    # threads (same applies to running MCE::Child or parallel module of yo
    +ur choice)
    
    ...
    }
    $queue->end;
    $_->join for @workers;