diff options
-rw-r--r-- | src/support/threads.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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() { |