Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Do threads do global destruction?

by DrWhy (Chaplain)
on Nov 09, 2012 at 23:10 UTC ( [id://1003215]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use threads;
    ...
    async { my $obj = MyObj->new("detach"); sleep 1 }->detach;
    async { my $obj = MyObj->new("join");   sleep 2 }->join;
            my $obj = MyObj->new("main");   sleep 3;
    
  2. or download this
    #!/usr/bin/perl
    use threads;
    ...
    async { $obj = MyObj->new("detach"); sleep 1 }->detach;
    async { $obj = MyObj->new("join");   sleep 2 }->join;
            $obj = MyObj->new("main");   sleep 3;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2025-03-20 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (62 votes). Check out past polls.