MADARA  3.1.8
madara::knowledge::TimedEventThread Class Reference

Thread executing timed events. More...

#include <TimedEventThread.h>

Inheritance diagram for madara::knowledge::TimedEventThread:
Collaboration diagram for madara::knowledge::TimedEventThread:

Public Member Functions

 TimedEventThread (TimedEventThreadInfo &info)
 Constructor. More...
 
 ~TimedEventThread ()
 Destructor. More...
 
int svc (void)
 Service loop for the thread. More...
 

Private Attributes

TimedEventThreadInfo info_
 info for service loop More...
 
CompiledExpression queued_or_terminated_
 expression for checking if events are queued or terminated More...
 
CompiledExpression thread_closed_
 expression for letting control plane know the thread is closed More...
 

Detailed Description

Thread executing timed events.

Definition at line 34 of file TimedEventThread.h.

Constructor & Destructor Documentation

madara::knowledge::TimedEventThread::TimedEventThread ( TimedEventThreadInfo info)

Constructor.

Definition at line 31 of file TimedEventThread.cpp.

madara::knowledge::TimedEventThread::~TimedEventThread ( )

Destructor.

Definition at line 73 of file TimedEventThread.cpp.

Member Function Documentation

int madara::knowledge::TimedEventThread::svc ( void  )

Service loop for the thread.

remove returns in one of three conditions 1) an event has a timeout, so cur_event.second is valid 2) an event is in the queue but not timed out, so sleep_time is a valid sleep time (>0.0) 3) there were no events in queue, so we slept on a condition, and we've now been signaled. It is possible that someone else has serviced the event since we were signaled. The result will be 0.0 in sleep_time and a need to try to remove again.

Definition at line 79 of file TimedEventThread.cpp.

Member Data Documentation

TimedEventThreadInfo madara::knowledge::TimedEventThread::info_
private

info for service loop

Definition at line 56 of file TimedEventThread.h.

CompiledExpression madara::knowledge::TimedEventThread::queued_or_terminated_
private

expression for checking if events are queued or terminated

Definition at line 62 of file TimedEventThread.h.

CompiledExpression madara::knowledge::TimedEventThread::thread_closed_
private

expression for letting control plane know the thread is closed

Definition at line 67 of file TimedEventThread.h.


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