(file) Return to ConsumerManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / DynListener

Diff for /pegasus/src/Pegasus/DynListener/ConsumerManager.cpp between version 1.13 and 1.14

version 1.13, 2006/04/18 19:08:43 version 1.14, 2006/07/11 18:39:33
Line 46 
Line 46 
 #include <Pegasus/Common/XmlParser.h> #include <Pegasus/Common/XmlParser.h>
 #include <Pegasus/Common/XmlWriter.h> #include <Pegasus/Common/XmlWriter.h>
 #include <Pegasus/Common/IPC.h> #include <Pegasus/Common/IPC.h>
   #include <Pegasus/Common/List.h>
   #include <Pegasus/Common/RecursiveMutex.h>
  
 #include "ConsumerManager.h" #include "ConsumerManager.h"
  
Line 884 
Line 886 
  
     DynamicConsumer* myself = static_cast<DynamicConsumer*>(param);     DynamicConsumer* myself = static_cast<DynamicConsumer*>(param);
     String name = myself->getName();     String name = myself->getName();
     DQueue<IndicationDispatchEvent> tmpEventQueue(true);      List<IndicationDispatchEvent,RecursiveMutex> tmpEventQueue;
  
     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2, "_worker_routine::entering loop for " + name);     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2, "_worker_routine::entering loop for " + name);
  
Line 909 
Line 911 
             }             }
  
             //create a temporary queue to store failed indications             //create a temporary queue to store failed indications
             tmpEventQueue.empty_list();              tmpEventQueue.clear();
  
             //continue processing events until the queue is empty             //continue processing events until the queue is empty
             //make sure to check for the shutdown signal before every iteration             //make sure to check for the shutdown signal before every iteration
Line 931 
Line 933 
  
                 //pop next indication off the queue                 //pop next indication off the queue
                 IndicationDispatchEvent* event = 0;                 IndicationDispatchEvent* event = 0;
                 event = myself->_eventqueue.remove_first();  //what exceptions/errors can this throw?                  event = myself->_eventqueue.remove_front();  //what exceptions/errors can this throw?
  
                 if (!event)                 if (!event)
                 {                 {
Line 989 
Line 991 
                         } else                         } else
                         {                         {
                             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "_worker_routine::placing failed indication back in queue");                             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "_worker_routine::placing failed indication back in queue");
                             tmpEventQueue.insert_last(event);                              tmpEventQueue.insert_back(event);
                         }                         }
  
                     } else                     } else
Line 1021 
Line 1023 
             myself->_eventqueue.try_lock();             myself->_eventqueue.try_lock();
             while (tmpEventQueue.size())             while (tmpEventQueue.size())
             {             {
                 //there is no = operator for DQueue so we must do it manually                  tmpEvent = tmpEventQueue.remove_front();
                 tmpEvent = tmpEventQueue.remove_first();                  myself->_eventqueue.insert_back(tmpEvent);
                 myself->_eventqueue.insert_last_no_lock(tmpEvent);  
  
             }             }
             myself->_eventqueue.unlock();             myself->_eventqueue.unlock();


Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2