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