Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Do threads do global destruction?

by DrWhy (Chaplain)
on Nov 09, 2012 at 23:10 UTC ( #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
Node Status?
node history
Node Type: note [id://1003215]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2014-04-17 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (454 votes), past polls