Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: removing all threads..

by BrowserUk (Pope)
on Dec 09, 2012 at 12:47 UTC ( #1007975=note: print w/replies, xml ) Need Help??

in reply to removing all threads..

You could add $_->join for threads::list(); just before the program ends; but it will require the threads to terminate before the program will end.

Alternatively, if you do not care to wait for the threads to complete; detach the threads, either when you create them:

threads->new( ... )->detach;

Or just before you exit the program:

$_->detach for threads::list(); sleep 1; exit;

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2016-10-26 14:51 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (341 votes). Check out past polls.