mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
17 lines
474 B
Diff
17 lines
474 B
Diff
diff --git a/src/cpp/server/create_default_thread_pool.cc b/src/cpp/server/create_default_thread_pool.cc
|
|
index f3b07ec..ede18cb
|
|
--- a/src/cpp/server/create_default_thread_pool.cc
|
|
+++ b/src/cpp/server/create_default_thread_pool.cc
|
|
@@ -40,8 +40,12 @@
|
|
namespace grpc {
|
|
|
|
ThreadPoolInterface* CreateDefaultThreadPool() {
|
|
+#ifdef NDEBUG
|
|
int cores = gpr_cpu_num_cores();
|
|
if (!cores) cores = 4;
|
|
+#else
|
|
+ int cores = 0;
|
|
+#endif
|
|
return new DynamicThreadPool(cores);
|
|
}
|
|
|