[Fix] ZAPD: Fix 1-core cpu machines in OTR generation tool (#2130)

This commit is contained in:
AltoXorg 2022-12-10 16:08:37 +08:00 committed by GitHub
parent 408143ec8c
commit 816122546b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -328,7 +328,7 @@ int main(int argc, char* argv[])
Directory::ListFiles(Globals::Instance->inputPath.string());
const int num_threads = std::thread::hardware_concurrency();
ctpl::thread_pool pool(num_threads / 2);
ctpl::thread_pool pool(num_threads > 1 ? num_threads / 2 : 1);
bool parseSuccessful;