Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Multithreading a large file split to multiple files

by jeffenstein (Pilgrim)
on May 16, 2018 at 08:35 UTC ( #1214618=note: print w/replies, xml ) Need Help??


in reply to Re: Multithreading a large file split to multiple files
in thread Multithreading a large file split to multiple files

From the IO::Handle documentation:

# setvbuf is not available by default on Perls 5.8.0 and later. use IO::Handle '_IOLBF'; $io->setvbuf($buffer_var, _IOLBF, 1024);

However, the PerlIO::buffersize module adds a PerlIO layer that can set the buffersize when opening a file:

open my $fh, '<:buffersize(65536)', $filename;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2018-08-19 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (188 votes). Check out past polls.

    Notices?