31 #if !defined(STTCL_USE_STL)
36 #if defined(STTCL_USE_STL)
37 #if !defined(STTCL_DEFAULT_DEQUEIMPL)
38 #define STTCL_DEFAULT_DEQUEIMPL(__T__) std::deque<__T__>
42 #if !defined(STTCL_DEFAULT_DEQUEIMPL)
43 #error "You need to define a default double ended queue implementation for sttcl"
46 #define EAIGNORE_BEGIN
57 ,
class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>
61 ,
class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T)
88 eventQueue.push_back(event);
90 eventsAvailable.post();
100 return eventQueue.front();
109 eventQueue.pop_front();
118 eventsAvailable.wait();
129 return eventsAvailable.try_wait(timeout) && !
empty();
139 return eventQueue.empty();
147 eventsAvailable.post();
153 InnerQueueType eventQueue;
154 MutexType eventQueueMutex;
155 SemaphoreType eventsAvailable;