From dbae0941963244fe7be588484b3ad80154f36de7 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 27 Feb 2024 10:28:26 -0800 Subject: [NFC] Use ifdef-else in threads.cpp (#6355) --- src/support/threads.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/support/threads.cpp b/src/support/threads.cpp index 58aa05be4..738898638 100644 --- a/src/support/threads.cpp +++ b/src/support/threads.cpp @@ -143,13 +143,13 @@ size_t ThreadPool::getNumCores() { // In an Emscripten build without pthreads support, avoid the overhead of // including support code for the below runtime checks. return 1; -#endif - +#else size_t num = std::max(1U, std::thread::hardware_concurrency()); if (getenv("BINARYEN_CORES")) { num = std::stoi(getenv("BINARYEN_CORES")); } return num; +#endif } ThreadPool* ThreadPool::get() { -- cgit v1.2.3