|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
An event of a queue: what its derived classes do with each item. More...
#include <q-consumer-threads.H>
Public Member Functions | |
| virtual bool | run ()=0 |
| this is a item extracted from the queue | |
| virtual | ~ConsumerQueueEvent ()=default |
| Virtual, so that a derived event is destroyed through this class. | |
Public Attributes | |
| T | item |
Private Types | |
| enum class | Status { Ready , Executing } |
Private Attributes | |
| std::atomic< Status > | status = { Status::Ready } |
An event of a queue: what its derived classes do with each item.
run() was pure but not virtual, so that the class did not compile; QueueTheadsPool uses its own nested event, QueueTheadsPool::Event.
Definition at line 69 of file q-consumer-threads.H.
|
strongprivate |
| Enumerator | |
|---|---|
| Ready | |
| Executing | |
Definition at line 72 of file q-consumer-threads.H.
|
virtualdefault |
Virtual, so that a derived event is destroyed through this class.
|
pure virtual |
this is a item extracted from the queue
Derived classes from this one implement the action that must performed when the item is extracted from the queue.
After event execution this event return a bool. A true return value indicates that the thread can continue consuming others items form the queue. At the contrary, a false return value indicates that the thread must finish
Referenced by TEST().
| T ConsumerQueueEvent< T >::item |
Definition at line 78 of file q-consumer-threads.H.
|
private |
Definition at line 74 of file q-consumer-threads.H.