Skip to content

Commit 572cbcc

Browse files
committed
Allow to customize threads
1 parent b6920d0 commit 572cbcc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/threadSettings.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ int getThreads(const bool& max){
1818
return( maxThreads );
1919
}
2020
int n = TinyParallel::resolveValue("FILEARRAY_NUM_THREADS", -1, maxThreads);
21-
n = maxThreads;
21+
if( n <= 0 || n > maxThreads ) {
22+
n = maxThreads;
23+
}
2224
return( n );
2325
}

0 commit comments

Comments
 (0)