Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^7: killing threads inside forks

by BrowserUk (Patriarch)
on Aug 02, 2013 at 04:18 UTC ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-19 20:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found