| 364 | } |
| 365 | |
| 366 | void thread_pool_worker::work_loop() { |
| 367 | s_tl_thread_pool_data.this_worker = this; |
| 368 | s_tl_thread_pool_data.this_thread_index = m_index; |
| 369 | |
| 370 | try { |
| 371 | while (true) { |
| 372 | if (!drain_queue()) { |
| 373 | return; |
| 374 | } |
| 375 | } |
| 376 | } catch (const errors::runtime_shutdown&) { |
| 377 | std::unique_lock<std::mutex> lock(m_lock); |
| 378 | m_idle = true; |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | void thread_pool_worker::ensure_worker_active(bool first_enqueuer, std::unique_lock<std::mutex>& lock) { |
| 383 | assert(lock.owns_lock()); |
nothing calls this directly
no outgoing calls
no test coverage detected