Helper for the singleton pattern
| 874 | |
| 875 | // Helper for the singleton pattern |
| 876 | std::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 | |
| 884 | ThreadPool* GetCpuThreadPool() { |
| 885 | // Avoid using a global variable because of initialization order issues (ARROW-18383) |
nothing calls this directly
no test coverage detected