Helper for the singleton pattern
| 881 | |
| 882 | // Helper for the singleton pattern |
| 883 | std::shared_ptr<ThreadPool> ThreadPool::MakeCpuThreadPool() { |
| 884 | auto maybe_pool = ThreadPool::MakeEternal(ThreadPool::DefaultCapacity()); |
| 885 | if (!maybe_pool.ok()) { |
| 886 | maybe_pool.status().Abort("Failed to create global CPU thread pool"); |
| 887 | } |
| 888 | return *std::move(maybe_pool); |
| 889 | } |
| 890 | |
| 891 | ThreadPool* GetCpuThreadPool() { |
| 892 | // Avoid using a global variable because of initialization order issues (ARROW-18383) |
nothing calls this directly
no test coverage detected