MCPcopy Create free account
hub / github.com/apache/arrow / MakeCpuThreadPool

Method MakeCpuThreadPool

cpp/src/arrow/util/thread_pool.cc:876–882  ·  view source on GitHub ↗

Helper for the singleton pattern

Source from the content-addressed store, hash-verified

874
875// Helper for the singleton pattern
876std::shared_ptr<ThreadPool> ThreadPool::MakeCpuThreadPool() {
877 auto maybe_pool = ThreadPool::MakeEternal(ThreadPool::DefaultCapacity());
878 if (!maybe_pool.ok()) {
879 maybe_pool.status().Abort("Failed to create global CPU thread pool");
880 }
881 return *std::move(maybe_pool);
882}
883
884ThreadPool* GetCpuThreadPool() {
885 // Avoid using a global variable because of initialization order issues (ARROW-18383)

Callers

nothing calls this directly

Calls 4

DefaultCapacityFunction · 0.85
okMethod · 0.45
AbortMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected