* Constructor that has to be called from a thread-neutral place. */
| 476 | * Constructor that has to be called from a thread-neutral place. |
| 477 | */ |
| 478 | ThreadLocal() : m_key(0) { |
| 479 | #ifdef __APPLE__ |
| 480 | ThreadLocalCreateKey(&m_key, nullptr); |
| 481 | ThreadLocalCreateKey(&m_cleanup_key, |
| 482 | ThreadLocalOnThreadExit<darwin_pthread_handler>); |
| 483 | #else |
| 484 | ThreadLocalCreateKey(&m_key, ThreadLocalOnThreadExit<T>); |
| 485 | #endif |
| 486 | } |
| 487 | |
| 488 | T *get() const { |
| 489 | T *obj = (T*)pthread_getspecific(m_key); |
nothing calls this directly
no test coverage detected