1 #ifndef RAYMARCHING_SYNCQUEUE_H
2 #define RAYMARCHING_SYNCQUEUE_H
6 #include <condition_variable>
21 std::condition_variable _cond;
55 std::lock_guard<std::mutex> lk(_mutex);
56 return _queue.empty();
61 std::lock_guard<std::mutex> lk(_mutex);
68 std::unique_lock<std::mutex> lk(_mutex);
69 _cond.wait(lk, [
this] {
return !this->_queue.empty(); });
70 T val = _queue.front();
Basic synchronized Queue template.
Definition: syncqueue.h:17
bool empty()
Definition: syncqueue.h:54
T deque()
Definition: syncqueue.h:67
void enqueue(T element)
Definition: syncqueue.h:60
Namespace containing all tools implemented within RayMarching package.
Definition: algebra.h:9