(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.123 and 1.123.2.1

version 1.123, 2006/07/26 20:34:00 version 1.123.2.1, 2006/07/27 23:11:51
Line 78 
Line 78 
  
 Uint32 max_threads_per_svc_queue; Uint32 max_threads_per_svc_queue;
  
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL  ThreadReturnType PEGASUS_THREAD_CDECL
 MessageQueueService::kill_idle_threads(void *parm) MessageQueueService::kill_idle_threads(void *parm)
 { {
  
Line 100 
Line 100 
    }    }
  
 #ifdef PEGASUS_POINTER_64BIT #ifdef PEGASUS_POINTER_64BIT
    return (PEGASUS_THREAD_RETURN)(Uint64)dead_threads;     return (ThreadReturnType)(Uint64)dead_threads;
 #elif PEGASUS_PLATFORM_AIX_RS_IBMCXX #elif PEGASUS_PLATFORM_AIX_RS_IBMCXX
    return (PEGASUS_THREAD_RETURN)(unsigned long)dead_threads;     return (ThreadReturnType)(unsigned long)dead_threads;
 #else #else
    return (PEGASUS_THREAD_RETURN)(Uint32)dead_threads;     return (ThreadReturnType)(Uint32)dead_threads;
 #endif #endif
 } }
  
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL MessageQueueService::polling_routine(void *parm)  ThreadReturnType PEGASUS_THREAD_CDECL MessageQueueService::polling_routine(void *parm)
 { {
    Thread *myself = reinterpret_cast<Thread *>(parm);    Thread *myself = reinterpret_cast<Thread *>(parm);
    List<MessageQueueService, RecursiveMutex> *list =     List<MessageQueueService, Mutex> *list =
        reinterpret_cast<List<MessageQueueService, RecursiveMutex>*>(myself->get_parm());         reinterpret_cast<List<MessageQueueService, Mutex>*>(myself->get_parm());
  
    while (_stop_polling.get()  == 0)    while (_stop_polling.get()  == 0)
    {    {
Line 177 
Line 177 
                     service->_incoming.count(),                     service->_incoming.count(),
                     service->_threads.get());                     service->_threads.get());
  
                  pegasus_yield();                   Threads::yield();
                  service = NULL;                  service = NULL;
               }               }
           }           }
Line 208 
Line 208 
  
       }       }
    }    }
    myself->exit_self( (PEGASUS_THREAD_RETURN) 1 );     myself->exit_self( (ThreadReturnType) 1 );
    return(0);    return(0);
 } }
  
Line 227 
Line 227 
      _mask(mask),      _mask(mask),
      _die(0),      _die(0),
      _threads(0),      _threads(0),
      _incoming(0),       _incoming(),
      _incoming_queue_shutdown(0)      _incoming_queue_shutdown(0)
 { {
  
Line 315 
Line 315 
  
    while (_threads.get() > 0)    while (_threads.get() > 0)
    {    {
       pegasus_yield();        Threads::yield();
    }    }
  
    {    {
Line 402 
Line 402 
 } }
  
  
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(  ThreadReturnType PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(
     void * parm)     void * parm)
 { {
     MessageQueueService* service =     MessageQueueService* service =
Line 710 
Line 710 
       while ( (tr =_polling_thread->run()) != PEGASUS_THREAD_OK)       while ( (tr =_polling_thread->run()) != PEGASUS_THREAD_OK)
       {       {
         if (tr == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)         if (tr == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)
            pegasus_yield();             Threads::yield();
         else         else
            throw Exception(MessageLoaderParms("Common.MessageQueueService.NOT_ENOUGH_THREAD",            throw Exception(MessageLoaderParms("Common.MessageQueueService.NOT_ENOUGH_THREAD",
                         "Could not allocate thread for the polling thread."));                         "Could not allocate thread for the polling thread."));
Line 805 
Line 805 
          } // message processing loop          } // message processing loop
  
          // shutdown the AsyncQueue          // shutdown the AsyncQueue
          service->_incoming.shutdown_queue();           service->_incoming.close();
          return;          return;
       }       }
  


Legend:
Removed from v.1.123  
changed lines
  Added in v.1.123.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2