in reply to What is the correct way to finish multithreaded program?
While I'm not an expert on threads, I believe this is the problem:
foreach my $thr (@threads) { if ( $thr->is_joinable() ) { $thr->join(); } }
You only join the threads that have already finished; instead you should join them all, i.e. wait for them to finish.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What is the correct way to finish multithreaded program?
by Gangabass (Vicar) on May 05, 2014 at 11:18 UTC | |
by moritz (Cardinal) on May 05, 2014 at 11:37 UTC | |
by Gangabass (Vicar) on May 05, 2014 at 12:18 UTC | |
by BrowserUk (Patriarch) on May 05, 2014 at 15:49 UTC | |
by Anonymous Monk on May 05, 2014 at 13:08 UTC | |
by Gangabass (Vicar) on May 06, 2014 at 03:04 UTC | |
by Anonymous Monk on May 05, 2014 at 12:24 UTC | |
by Anonymous Monk on May 05, 2014 at 11:35 UTC |