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

Method MakeCpuThreadPool

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

Helper for the singleton pattern

Source from the content-addressed store, hash-verified

816
817// Helper for the singleton pattern
818std::shared_ptr<ThreadPool> ThreadPool::MakeCpuThreadPool() {
819 auto maybe_pool = ThreadPool::MakeEternal(ThreadPool::DefaultCapacity());
820 if (!maybe_pool.ok()) {
821 maybe_pool.status().Abort("Failed to create global CPU thread pool");
822 }
823 return *std::move(maybe_pool);
824}
825
826ThreadPool* GetCpuThreadPool() {
827 // 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