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

Diff for /pegasus/src/Pegasus/Common/MessageQueueService.cpp between version 1.112 and 1.113

version 1.112, 2005/06/14 17:10:37 version 1.113, 2005/06/24 19:34:23
Line 124 
Line 124 
       MessageQueueService *service = list->next(0);       MessageQueueService *service = list->next(0);
       while(service != NULL)       while(service != NULL)
         {         {
           int rtn;            ThreadStatus rtn;
           rtn = true;            rtn = PEGASUS_THREAD_OK;
           if (service->_incoming.count() > 0           if (service->_incoming.count() > 0
               && service->_die.value() == 0               && service->_die.value() == 0
               && service->_threads <= max_threads_per_svc_queue)               && service->_threads <= max_threads_per_svc_queue)
Line 133 
Line 133 
                                                         &_polling_sem);                                                         &_polling_sem);
  
           // if no more threads available, break from processing loop           // if no more threads available, break from processing loop
           if (rtn == false)            if (rtn != PEGASUS_THREAD_OK )
             {             {
                   Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                           "Not enough threads to process this request. Skipping.");
   
                   Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL2,
                           "Could not allocate thread for %s. " \
                           "Queue has %d messages waiting and %s threads servicing." \
                           "Skipping the service for right now. ",
                           service->getQueueName(),
                           service->_incoming.count(),
                           service->_threads.value());
   
                 pegasus_yield();
               service = NULL;               service = NULL;
             }             }
           else           else
Line 151 
Line 163 
          // if system is busy there may not be a thread available to allocate          // if system is busy there may not be a thread available to allocate
          // so nothing will be done and that is OK.          // so nothing will be done and that is OK.
  
          _thread_pool->allocate_and_awaken(service, kill_idle_threads, &_polling_sem);           if ( _thread_pool->allocate_and_awaken(service, kill_idle_threads, &_polling_sem) != PEGASUS_THREAD_OK)
            {
                   Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                           "Not enough threads to kill idle threads. What an irony.");
   
                   Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL2,
                           "Could not allocate thread to kill idle threads." \
                           "Skipping. ");
            }
   
  
       }       }
    }    }
Line 645 
Line 666 
           polling_routine,           polling_routine,
           reinterpret_cast<void *>(&_polling_list),           reinterpret_cast<void *>(&_polling_list),
           false);           false);
       while (!_polling_thread->run())        ThreadStatus tr = PEGASUS_THREAD_OK;
         while ( (tr =_polling_thread->run()) != PEGASUS_THREAD_OK)
       {       {
           if (tr == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)
          pegasus_yield();          pegasus_yield();
           else
              throw Exception(MessageLoaderParms("Common.MessageQueueService.NOT_ENOUGH_THREAD",
                           "Could not allocate thread for the polling thread."));
       }       }
    }    }
 // ATTN optimization remove the message checking altogether in the base // ATTN optimization remove the message checking altogether in the base


Legend:
Removed from v.1.112  
changed lines
  Added in v.1.113

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2