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

Re^4: How to split file for threading?

by diyaz (Beadle)
on Jun 23, 2015 at 16:48 UTC ( [id://1131668]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    our $T //= 4;
    
  2. or download this
    my @threads = map{
        threads->new( \&worker, $filename, $target, $chunks[ $_ ], $chunks
    +[ $_+1 ] )
    } 0 .. $T-1;
    
  3. or download this
    my $total = 0;
    $total += $_->join for @threads;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-18 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found