Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: removing all threads..

by zentara (Archbishop)
on Dec 10, 2012 at 11:08 UTC ( #1008086=note: print w/ replies, xml ) Need Help??


in reply to removing all threads..

Since the script is old, you could try putting this code block at the end of your existing main code.

while( (scalar threads->list) > 0 ){ print scalar threads->list,"\n"; sleep 1; foreach my $thread (threads->list) { if( $thread->is_joinable ){ $thread->join;} } }
You also should look at the old code, and see if die or exit is used anywhere. If any thread calls die or exit, it will bring down the whole program with your warning issued, which is harmless. However, you might want to put this in your code
use threads ( 'exit' => 'threads_only');

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh


Comment on Re: removing all threads..
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-12-27 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls