- or download this
% time ./re.sh
real 0m5,201s
user 0m43,394s
sys 0m1,302
- or download this
#!/usr/bin/env perl
# https://www.perlmonks.org/?node_id=11147200
...
}
)->spawn;
- or download this
# first, truncate output file
{ open my $fh, '>', "out-sed.dat" or die "$!\n"; }
...
$mce->process("in.txt", { user_args => [ "out-sed.dat" ] })
$mce->shutdown;
- or download this
# Process file(s).
my $status = 0;
...
$mce->shutdown; # reap workers
exit $status;
- or download this
# Worker function.
sub process_chunk {
...
MCE->relay_unlock;
}
- or download this
# Worker function.
sub process_chunk {
...
MCE->relay_unlock;
}