Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: use threads for dir tree walking really hurts

by Corion (Patriarch)
on Aug 31, 2016 at 13:29 UTC ( [id://1170882]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Devel::Pointer;
    ...
        my $obj = deref ( $addr ) ;            
        my $root = shift ( @{$obj->{dirToFetch}} ) ;
    
  2. or download this
    ...
    sub _walk {
    ...
    }
    ...
            threads->create ( '_walk' , $self ) -> join;
    
  3. or download this
    ...
            push my @running, threads->create ( '_walk' , $self );
    ...
        my $next = shift @running;
        $next->join;
    };
    
  4. or download this
    #! perl -slw
    use strict;
    ...
    print while defined( $_ = $files->dequeue );
    
    print 'Done';
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-23 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found