Help for this page

Select Code to Download


  1. or download this
    my $pm = Parallel::ForkManager->new(50);  # 50 forks
    my $i = 0;
    ...
      $pm->finish; # do the exit in the child process
    }
    $pm->wait_all_children();  # and then do nothing
    
  2. or download this
    # max 4 processes simultaneously
    my $pm = Parallel::ForkManager->new(4);
    ...
      $pm->finish; # do the exit in the child process
    }
    $pm->wait_all_children();