MTDistributedCycledAnalogMsgDispatcher.cpp

Go to the documentation of this file.
00001 #include "MTDistributedCycledAnalogMsgDispatcher.h"
00002 
00003 MTDistributedCycledAnalogMsgDispatcher::MTDistributedCycledAnalogMsgDispatcher(ThreadPool &thrPool,
00004         vector< DistributedAnalogMessageDispatcher *> & stCycledAnalogDispatchers)
00005         : thr_pool(thrPool)
00006 {
00007     for (int i = 0; i < (int)stCycledAnalogDispatchers.size() ; ++i)
00008         jobs.push_back(DistributedCycledAnalogMessagesDispatchJob(stCycledAnalogDispatchers[i]));
00009 }
00010 
00011 MTDistributedCycledAnalogMsgDispatcher::~MTDistributedCycledAnalogMsgDispatcher()
00012 {}
00013 
00014 
00015 void MTDistributedCycledAnalogMsgDispatcher::dispatchDelayerCycledIncomingAnalogMsgs()
00016 {
00017     for (int i = 0; i < thr_pool.getNumThreads(); ++i)
00018         thr_pool.dispatch(i, jobs[i]);
00019     jobs[thr_pool.getNumThreads()].start();
00020     thr_pool.waitAll();
00021 }

Generated on Wed Jul 9 16:34:38 2008 for PCSIM by  doxygen 1.5.5