Block until all work associated with the executor is complete. While it is waiting, the thread may be borrowed to execute functions from the queue.
| 190 | // Block until all work associated with the executor is complete. While it is |
| 191 | // waiting, the thread may be borrowed to execute functions from the queue. |
| 192 | void join() const |
| 193 | { |
| 194 | std::unique_lock<std::mutex> lock(context_.mutex_); |
| 195 | while (*work_count_ > 0) |
| 196 | if (!context_.execute_next(lock)) |
| 197 | context_.condition_.wait(lock); |
| 198 | } |
| 199 | |
| 200 | private: |
| 201 | template <class Func> |
no test coverage detected