diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/support/threads.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/support/threads.cpp b/src/support/threads.cpp index 6edff21cb..2f558d051 100644 --- a/src/support/threads.cpp +++ b/src/support/threads.cpp @@ -117,6 +117,9 @@ void ThreadPool::initialize(size_t num) { ThreadPool* ThreadPool::get() { if (!pool) { size_t num = std::max(1U, std::thread::hardware_concurrency()); + if (getenv("BINARYEN_CORES")) { + num = std::stoi(getenv("BINARYEN_CORES")); + } pool = std::unique_ptr<ThreadPool>(new ThreadPool()); pool->initialize(num); } |