24 std::lock_guard<std::mutex> lock(mtx_);
32 std::unique_lock<std::mutex> lock(mtx_);
34 cv_.wait_for(lock, d, [&]() {
return not queue_.empty(); });
35 if (not hasElements) {
38 auto t = queue_.front();
45 std::lock_guard<std::mutex> lock(mtx_);
46 return queue_.empty();
51 std::lock_guard<std::mutex> lock(mtx_);
size_t size() const
Definition: concurrent_queue-inl.h:50
void enqueue(T t)
Definition: concurrent_queue-inl.h:22
bool empty() const
Definition: concurrent_queue-inl.h:44
T dequeueWaitFor(std::chrono::steady_clock::duration)
Definition: concurrent_queue-inl.h:31