This needs to be called before every IO or simple task callback.*/
| 50 | } |
| 51 | /** This needs to be called before every IO or simple task callback.*/ |
| 52 | void callback_prolog(thread_pool_win* pool) |
| 53 | { |
| 54 | assert(pool); |
| 55 | assert(!m_pool || (m_pool == pool)); |
| 56 | if (m_pool) |
| 57 | { |
| 58 | // TLS data already initialized. |
| 59 | return; |
| 60 | } |
| 61 | m_pool = pool; |
| 62 | m_pool->m_thread_count++; |
| 63 | // Call the thread init function. |
| 64 | m_pool->m_worker_init_callback(); |
| 65 | } |
| 66 | }; |
| 67 | |
| 68 | static thread_local struct tls_data tls_data; |
no outgoing calls
no test coverage detected