diff options
author | Alon Zakai <azakai@google.com> | 2024-02-27 10:28:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 10:28:26 -0800 |
commit | dbae0941963244fe7be588484b3ad80154f36de7 (patch) | |
tree | 3eaedf31d05e8cf4200b5f073e0f9601be8dc000 /src/support | |
parent | 6a429411a07a35ec31af6a66d04dbf4637bcf2ef (diff) | |
download | binaryen-dbae0941963244fe7be588484b3ad80154f36de7.tar.gz binaryen-dbae0941963244fe7be588484b3ad80154f36de7.tar.bz2 binaryen-dbae0941963244fe7be588484b3ad80154f36de7.zip |
[NFC] Use ifdef-else in threads.cpp (#6355)
Diffstat (limited to 'src/support')
-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() { |