| 2304 | } |
| 2305 | |
| 2306 | bool AsyncDispatchWorker::clean(void) { |
| 2307 | std::mutex m; |
| 2308 | std::unique_lock<std::mutex> lk(m); |
| 2309 | cv.wait(lk, [] { return !ELPP->asyncLogQueue()->empty(); }); |
| 2310 | emptyQueue(); |
| 2311 | lk.unlock(); |
| 2312 | cv.notify_one(); |
| 2313 | return ELPP->asyncLogQueue()->empty(); |
| 2314 | } |
| 2315 | |
| 2316 | void AsyncDispatchWorker::emptyQueue(void) { |
| 2317 | while (!ELPP->asyncLogQueue()->empty()) { |
nothing calls this directly
no test coverage detected