this wrapper encapsulates both the owning_threadpool pointer and the thread id. this is done to improve performance on the emulated thread_local reducing the number of calls to "pthread_getspecific"
| 81 | // this is done to improve performance on the emulated thread_local reducing the number |
| 82 | // of calls to "pthread_getspecific" |
| 83 | struct threadpool_data_wrapper { |
| 84 | threadpool_data* owning_threadpool; |
| 85 | std::size_t thread_id; |
| 86 | |
| 87 | threadpool_data_wrapper(threadpool_data* owning_threadpool, std::size_t thread_id): |
| 88 | owning_threadpool(owning_threadpool), thread_id(thread_id) { } |
| 89 | }; |
| 90 | |
| 91 | #if defined(EMULATE_PTHREAD_THREAD_LOCAL) |
| 92 | struct pthread_emulation_threadpool_data_initializer { |
no outgoing calls
no test coverage detected