Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 perusing the Monastery: (10)
As of 2014-09-17 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (70 votes), past polls