main
Benjamin Kraft 2 years ago
parent e81a883bda
commit 8113a4b077
  1. 5
      src/Queue.h

@ -17,7 +17,7 @@ class Queue {
std::mutex mutex;
void run() {
while (!QApplication::closingDown()){
if (!isEmpty())
if (tail != head)
update();
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
@ -29,9 +29,6 @@ class Queue {
size_t head = 0;
T * container[MAX_QUEUE_SIZE];
protected:
bool isEmpty() const {
return tail == head;
}
T * pop(){
mutex.lock();
T * element = container[head];

Loading…
Cancel
Save