Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: What is the correct way to finish multithreaded program?

by Gangabass (Priest)
on May 05, 2014 at 12:18 UTC ( #1085053=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach ( 1 .. $config->{number_of_threads} ) {
    
        $q->enqueue(undef);
    }
    
  2. or download this
        while ( my $org = $q->dequeue() ) {
    
    ...
        say "Finishing worker [$thread_id]";
    
        return;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1085053]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-07-31 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls