1#if !defined(RESIP_FIFO_HXX)
68 mInterruptor(interruptor)
82 Lock lock(mMutex); (void)lock;
83 mInterruptor=interruptor;
91 Lock lock(mMutex); (void)lock;
92 while ( ! mFifo.empty() )
105 if(size==1 && mInterruptor)
108 mInterruptor->handleProcessNotification();
117 size_t inSize = msgs.size();
119 if(size==inSize && inSize != 0 && mInterruptor)
122 mInterruptor->handleProcessNotification();
#define resip_assert(x)
This file needs to work for both C and C++ code.
The base class from which various templated Fifo classes are derived.
virtual unsigned int size() const
get the current size of the fifo.
Condition mCondition
condition for waiting on new queue items
T getNext()
Returns the first message available.
bool empty() const
is the queue empty?
size_t add(const T &item)
size_t addMultiple(Messages &items)
Messages mFifo
container for FIFO items
void getMultiple(Messages &other, unsigned int max)
Mutex mMutex
access serialization lock
A templated, threadsafe message-queue class.
bool getMultiple(int ms, Messages &other, unsigned int max)
virtual void clear()
delete all elements in the queue
AbstractFifo< Msg * >::Messages Messages
void setInterruptor(AsyncProcessHandler *interruptor)
Fifo(AsyncProcessHandler *interruptor=0)
Msg * getNext()
Returns the first message available.
size_t addMultiple(Messages &msgs)
void getMultiple(Messages &other, unsigned int max)
Msg * getNext(int ms)
Returns the next message available.
size_t add(Msg *msg)
Add a message to the fifo.
dcm! – add UnusedChecking(_enum) below;
std::unique_lock< Mutex > Lock
A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destructio...