mirror of
https://github.com/manuelkasper/AS-Stats.git
synced 2025-02-20 11:44:12 +08:00
Fix warning when THREADS env var is missing
This commit is contained in:
parent
858c646e01
commit
a0ffd9d867
@ -43,7 +43,7 @@ $|=1;
|
|||||||
my $i :shared = 0;
|
my $i :shared = 0;
|
||||||
|
|
||||||
my $num_workers = 1;
|
my $num_workers = 1;
|
||||||
if (($ENV{'THREADS'} =~ /^\d+$/) and ($ENV{'THREADS'} > 0)) {
|
if (($ENV{'THREADS'}) and ($ENV{'THREADS'} =~ /^\d+$/) and ($ENV{'THREADS'} > 0)) {
|
||||||
$num_workers = $ENV{'THREADS'};
|
$num_workers = $ENV{'THREADS'};
|
||||||
}
|
}
|
||||||
print("Using " . $num_workers . " threads.\n");
|
print("Using " . $num_workers . " threads.\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user