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

Re^7: killing threads inside forks

by BrowserUk (Pope)
on Aug 02, 2013 at 04:18 UTC ( #1047538=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
          my $t = threads->create (sub{
              ## You run your thread function here
    ...
              #$shutdown = 1;
              ## and then exit the thread.
           });
    
  2. or download this
       sleep until $shutdown;
    
  3. or download this
             if ($_ != $$){
                $_->kill('KILL')->detach;
             }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-12-25 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (159 votes), past polls