Change default number of threads to 1 (original behavior)

This commit is contained in:
Robert Lanyi 2020-03-22 14:42:07 +01:00
parent 37a7633ded
commit 858c646e01

View File

@ -42,8 +42,7 @@ my @rrdfiles = File::Find::Rule->maxdepth(2)->file->in($rrdpath);
$|=1;
my $i :shared = 0;
my $cpus = do { local @ARGV='/proc/cpuinfo'; grep /^processor\s+:/, <>;};
my $num_workers = $cpus / 2;
my $num_workers = 1;
if (($ENV{'THREADS'} =~ /^\d+$/) and ($ENV{'THREADS'} > 0)) {
$num_workers = $ENV{'THREADS'};
}