in reply to Re^3: What is the correct way to finish multithreaded program?
in thread What is the correct way to finish multithreaded program?
I'm pushing undef into the queue with
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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: What is the correct way to finish multithreaded program?
by BrowserUk (Patriarch) on May 05, 2014 at 15:49 UTC | |
Re^5: What is the correct way to finish multithreaded program?
by Anonymous Monk on May 05, 2014 at 13:08 UTC | |
by Gangabass (Vicar) on May 06, 2014 at 03:04 UTC | |
Re^5: What is the correct way to finish multithreaded program?
by Anonymous Monk on May 05, 2014 at 12:24 UTC |
In Section
Seekers of Perl Wisdom