Help for this page

Select Code to Download


  1. or download this
    for $i (0..$number) {
      $thr_{$i} = new Thread \&sub_routine, arg1, @array_of args;
    ...
      do something;
      return "Thread completed successfully";
    }
    
  2. or download this
    my @threads_return_data
    for $i (0 .. $number) {
            push @threads_return_data, $thr_{$i}->join;
        }
    post_processing_subroutine();