| 166 | } |
| 167 | |
| 168 | void EventLoopThreadPool::OnThreadExited(uint32_t count) { |
| 169 | DLOG_TRACE << "tid=" << std::this_thread::get_id() << " count=" << count << " exited."; |
| 170 | if (count == thread_num_) { |
| 171 | status_.store(kStopped); |
| 172 | DLOG_TRACE << "this is the last thread stopped. Thread pool totally exited."; |
| 173 | if (stopped_cb_) { |
| 174 | stopped_cb_(); |
| 175 | stopped_cb_ = DoneCallback(); |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | } |