Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ConsumerQueueEvent< T > Class Template Referenceabstract

#include <q-consumer-threads.H>

Collaboration diagram for ConsumerQueueEvent< T >:
[legend]

Public Member Functions

bool run ()=0
 this is a item extracted from the queue
 

Public Attributes

T item
 

Private Types

enum class  Status { Ready , Executing }
 

Private Attributes

std::atomic< Statusstatus = { Status::Ready }
 

Detailed Description

template<typename T>
class ConsumerQueueEvent< T >

Definition at line 59 of file q-consumer-threads.H.

Member Enumeration Documentation

◆ Status

template<typename T >
enum class ConsumerQueueEvent::Status
strongprivate
Enumerator
Ready 
Executing 

Definition at line 61 of file q-consumer-threads.H.

Member Function Documentation

◆ run()

template<typename T >
bool ConsumerQueueEvent< T >::run ( )
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

Member Data Documentation

◆ item

template<typename T >
T ConsumerQueueEvent< T >::item

Definition at line 67 of file q-consumer-threads.H.

◆ status

template<typename T >
std::atomic<Status> ConsumerQueueEvent< T >::status = { Status::Ready }
private

Definition at line 63 of file q-consumer-threads.H.


The documentation for this class was generated from the following file: