block_queue: add method to check if given queue is full

master
Andre Puschmann 5 years ago
parent f39abe0094
commit 7a66a00e15

@ -113,6 +113,14 @@ public:
return ret;
}
bool full()
{ // queue is full?
pthread_mutex_lock(&mutex);
bool ret = not check_queue_space_unlocked(false);
pthread_mutex_unlock(&mutex);
return ret;
}
void clear()
{ // remove all items
myobj* item = NULL;

Loading…
Cancel
Save