reSIProcate/repro  9694
Public Member Functions | Protected Attributes
repro::WorkerThread Class Reference

#include <WorkerThread.hxx>

Inheritance diagram for repro::WorkerThread:
Inheritance graph
[legend]
Collaboration diagram for repro::WorkerThread:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 WorkerThread (Worker *impl, resip::TimeLimitFifo< resip::ApplicationMessage > &fifo, resip::SipStack *stack)
virtual ~WorkerThread ()
void thread ()

Protected Attributes

WorkermWorker
resip::TimeLimitFifo
< resip::ApplicationMessage > & 
mFifo
resip::SipStackmStack

Detailed Description

Definition at line 17 of file WorkerThread.hxx.


Constructor & Destructor Documentation

repro::WorkerThread::WorkerThread ( Worker impl,
resip::TimeLimitFifo< resip::ApplicationMessage > &  fifo,
resip::SipStack stack 
)

Definition at line 12 of file WorkerThread.cxx.

                                             :
   mWorker(worker),
   mFifo(fifo),
   mStack(stack)
{}
repro::WorkerThread::~WorkerThread ( ) [virtual]

Definition at line 20 of file WorkerThread.cxx.

{
   shutdown();
   join();
   delete mWorker;
}

Member Function Documentation

void repro::WorkerThread::thread ( ) [virtual]

Implements resip::ThreadIf.

Definition at line 28 of file WorkerThread.cxx.

{
   resip::ApplicationMessage* msg;
   bool queueToStack;
   while(mWorker && !isShutdown())
   {
      if( (msg=mFifo.getNext(100)) != 0 )
      {
         queueToStack = mWorker->process(msg);

         if(queueToStack && mStack)
         {
            // Post to stack instead of directly to TU, since stack does
            // some safety checks to ensure the TU still exists before posting
            mStack->post(std::auto_ptr<resip::ApplicationMessage>(msg));
         }
         else
         {
            //ErrLog(<<"Stack pointer not set!");
            delete msg;
         }
      }
   }
}

Member Data Documentation

Definition at line 27 of file WorkerThread.hxx.

Definition at line 28 of file WorkerThread.hxx.

Definition at line 26 of file WorkerThread.hxx.


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