and I think this will cause thread to return:foreach ( 1 .. $config->{number_of_threads} ) { $q->enqueue(undef); }
Also I have Finishing worker [SOME_ID] in the output...while ( my $org = $q->dequeue() ) { parse_org( $org, $mech ); $pq->enqueue($org); } say "Finishing worker [$thread_id]"; return;
In reply to Re^4: What is the correct way to finish multithreaded program?
by Gangabass
in thread What is the correct way to finish multithreaded program?
by Gangabass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |