Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Things you need to know before programming Perl ithreads

by liz (Monsignor)
on Aug 31, 2003 at 13:21 UTC ( #288022=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use threads ();
    my $foo;
    threads->new( sub {print "thread: coderef = ".\$foo."\n"} )->join;
    print "  main: coderef = ".\$foo."\n";
    
  2. or download this
    use threads ();
    sub foo {1}
    threads->new( sub {print "thread: coderef = ".\&foo."\n"} )->join;
    print "  main: coderef = ".\&foo."\n";
    
  3. or download this
    use threads ();
    threads->new( sub {
    ...
        # do your Benchmark stuff
    } )->join;
    print "Benchmark has been loaded!\n" if defined $Benchmark::VERSION;
    
  4. or download this
    use threads ();
    threads->new( sub {
    ...
        # do your Benchmark stuff
    } )->join;
    print "Benchmark has not been loaded!\n" unless defined $Benchmark::VE
    +RSION;
    
  5. or download this
    use threads ();
    threads->new( sub {
    ...
        # do your Benchmark stuff
    } )->join;
    use Benchmark;
    
  6. or download this
    use threads ();
    my $thread;
    ...
    }
    use Benchmark;
    $thread->join;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://288022]
Front-paged by gjb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2014-09-18 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (120 votes), past polls