(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.31 and 1.31.10.2

version 1.31, 2008/12/16 18:56:42 version 1.31.10.2, 2011/08/10 04:59:40
Line 305 
Line 305 
             "Consumer not found in cache, creating %s",             "Consumer not found in cache, creating %s",
             (const char*)consumerName.getCString()));             (const char*)consumerName.getCString()));
         consumer = new DynamicConsumer(consumerName);         consumer = new DynamicConsumer(consumerName);
         //ATTN: The above is a memory leak if _initConsumer throws an exception  
         //need to delete it in that case  
     }     }
  
     if (!cached)     if (!cached)
     {     {
           AutoPtr<DynamicConsumer> destroyer(consumer);
         _initConsumer(consumerName, consumer);         _initConsumer(consumerName, consumer);
           destroyer.release();
  
         if (!entryExists)         if (!entryExists)
         {         {
Line 391 
Line 391 
  
         consumer->initialize();         consumer->initialize();
  
         //ATTN: need to change this          Semaphore* semaphore = consumer->getShutdownSemaphore();
         Semaphore* semaphore = new Semaphore(0);  //blocking  
   
         consumer->setShutdownSemaphore(semaphore);  
  
         //start the worker thread         //start the worker thread
         if (_thread_pool->allocate_and_awaken(consumer,         if (_thread_pool->allocate_and_awaken(consumer,
Line 406 
Line 403 
                 Tracer::LEVEL1,                 Tracer::LEVEL1,
                 "Could not allocate thread for consumer.");                 "Could not allocate thread for consumer.");
  
             consumer->setShutdownSemaphore(0);  
             delete semaphore;  
             throw Exception(             throw Exception(
                 MessageLoaderParms(                 MessageLoaderParms(
                     "DynListener.ConsumerManager.CANNOT_ALLOCATE_THREAD",                     "DynListener.ConsumerManager.CANNOT_ALLOCATE_THREAD",


Legend:
Removed from v.1.31  
changed lines
  Added in v.1.31.10.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2