Skip to content

Commit f90d74a

Browse files
author
Mateusz Kopciński
committed
fix to a bug where sometimes threadpool could be configured to 0 workers
1 parent e25d86d commit f90d74a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/react-native-executorch/common/rnexecutorch/threads/GlobalThreadPool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class GlobalThreadPool {
3333
::executorch::extension::cpuinfo::get_num_performant_cores();
3434
}
3535

36+
numThreads = std::max(numThreads.value(), 2u);
3637
log(rnexecutorch::LOG_LEVEL::Info, "Initializing global thread pool with",
3738
numThreads, "threads");
3839
instance = std::make_unique<HighPerformanceThreadPool>(numThreads.value(),

0 commit comments

Comments
 (0)