in reply to Thread exit errors
Is there a way to stop the first thread from exiting until all the other threads are finsished?In the main thread, do something like:
although that could interfere with the threads being created in runSeries (I don't understand why you create a new thread there), in which case do this instead:$_->join for threads->list;
my @threads; foreach $host (@syshost) { push @threads, threads->new(\&runSeries, $host); } $_->join for @threads;
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Thread exit errors
by JFarr (Sexton) on Nov 17, 2005 at 22:52 UTC | |
by dave_the_m (Monsignor) on Nov 17, 2005 at 23:06 UTC |