Anon namespace over static

pull/11693/head
ncteisen 8 years ago
parent a5d557b96d
commit eb70b9e0df
  1. 7
      src/cpp/server/create_default_thread_pool.cc

@ -23,14 +23,17 @@
#ifndef GRPC_CUSTOM_DEFAULT_THREAD_POOL
namespace grpc {
namespace {
static ThreadPoolInterface* CreateDefaultThreadPoolImpl() {
ThreadPoolInterface* CreateDefaultThreadPoolImpl() {
int cores = gpr_cpu_num_cores();
if (!cores) cores = 4;
return new DynamicThreadPool(cores);
}
static CreateThreadPoolFunc g_ctp_impl = CreateDefaultThreadPoolImpl;
CreateThreadPoolFunc g_ctp_impl = CreateDefaultThreadPoolImpl;
} // namespace
ThreadPoolInterface* CreateDefaultThreadPool() { return g_ctp_impl(); }

Loading…
Cancel
Save