| 654 | #endif |
| 655 | |
| 656 | static pthread_key_t getKey() { |
| 657 | if (!s_inited) { |
| 658 | s_inited = true; |
| 659 | #ifdef __APPLE__ |
| 660 | ThreadLocalCreateKey(&s_key, nullptr); |
| 661 | ThreadLocalCreateKey(&s_cleanup_key, |
| 662 | ThreadLocalOnThreadExit<darwin_pthread_handler>); |
| 663 | #else |
| 664 | ThreadLocalCreateKey(&s_key, ThreadLocalSingletonOnThreadExit<T>); |
| 665 | #endif |
| 666 | } |
| 667 | return s_key; |
| 668 | } |
| 669 | }; |
| 670 | |
| 671 | template<typename T> |
nothing calls this directly
no test coverage detected