Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: perl threads in a recursive function

by BrowserUk (Patriarch)
on Aug 21, 2013 at 14:56 UTC ( [id://1050363]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub quicksort {
        return @_ unless @_ > 1;
    ...
            quicksort( grep $_ >= $pivot, @_ ),
        );
    }
    
  2. or download this
    sub quicksort_t {
        return @_ unless @_ > 1;
    ...
        my $t2 = asyncl sub{ quicksort( grep $_ >= $pivot, @_ ) }, @_;
        return ( $t1->join, $pivot, $t2->join );
    }
    
  3. or download this
    sub _quicksort_t {
        return @_ unless @_ > 1;
    ...
        my $t2 = asyncl sub{ _quicksort_t( grep $_ >= $pivot, @_ ) }, @_;
        return ( $t1->join, $pivot, $t2->join );
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-25 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found