|
KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
|
|
#include <lockingqueue.h>
Inheritance diagram for LockingQueue< T >:
Collaboration diagram for LockingQueue< T >:Public Member Functions | |
| T | dequeue (quint32 waitTimeMs, bool &success) |
| Remove and return the front element, blocking until one is available or timeout elapses. | |
| void | enqueue (const T &t) |
| Append an element to the back of the queue and wake one waiting consumer. | |
Thread-safe Multi-producer Multi-consumer blocking queue
Stephen Punak, July 08 2019
Thread-safe, blocking multi-producer multi-consumer queue.
| T | Element type stored in the queue |
Definition at line 21 of file lockingqueue.h.
|
inline |
Remove and return the front element, blocking until one is available or timeout elapses.
| waitTimeMs | Maximum time to wait in milliseconds |
| success | Output set to true if an element was dequeued, false on timeout |
Definition at line 30 of file lockingqueue.h.
|
inline |
Append an element to the back of the queue and wake one waiting consumer.
| t | Element to enqueue |
Definition at line 62 of file lockingqueue.h.