| 647 | |
| 648 | namespace { |
| 649 | DWORD GetPoolTlsIndex() { |
| 650 | static DWORD index = [] { |
| 651 | DWORD i = TlsAlloc(); |
| 652 | if (i == TLS_OUT_OF_INDEXES) { |
| 653 | ARROW_LOG(FATAL) << "TlsAlloc failed for thread pool TLS: " |
| 654 | << WinErrorMessage(GetLastError()); |
| 655 | } |
| 656 | return i; |
| 657 | }(); |
| 658 | return index; |
| 659 | } |
| 660 | } // namespace |
| 661 | |
| 662 | static ThreadPool* GetCurrentThreadPool() { |
no test coverage detected