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