(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.61 and 1.62

version 1.61, 2002/06/25 16:13:42 version 1.62, 2002/07/12 23:10:04
Line 46 
Line 46 
  
 DQueue<MessageQueueService> MessageQueueService::_polling_list(true); DQueue<MessageQueueService> MessageQueueService::_polling_list(true);
  
 void MessageQueueService::_exit_routine(void)  Thread* MessageQueueService::_polling_thread = 0;
 {  
    _stop_polling = 1;  
    _polling_sem.signal();  
   
 }  
  
  
 int MessageQueueService::kill_idle_threads(void) int MessageQueueService::kill_idle_threads(void)
Line 84 
Line 79 
       _polling_sem.wait();       _polling_sem.wait();
       if(_stop_polling.value() != 0 )       if(_stop_polling.value() != 0 )
       {       {
          list->unlock();           break;
          myself->exit_self((PEGASUS_THREAD_RETURN) 1 );  
       }       }
  
       list->lock();       list->lock();
Line 105 
Line 99 
    return(0);    return(0);
 } }
  
 Thread MessageQueueService::_polling_thread(polling_routine,  
                                             reinterpret_cast<void *>(&_polling_list),  
                                             false);  
   
  
 Semaphore MessageQueueService::_polling_sem(0); Semaphore MessageQueueService::_polling_sem(0);
 AtomicInt MessageQueueService::_stop_polling(0); AtomicInt MessageQueueService::_stop_polling(0);
Line 149 
Line 139 
       }       }
       _thread_pool = new ThreadPool(0, "MessageQueueService", 0, 0,       _thread_pool = new ThreadPool(0, "MessageQueueService", 0, 0,
                                     create_time, destroy_time, deadlock_time);                                     create_time, destroy_time, deadlock_time);
       atexit(_exit_routine);  
  
       _polling_thread.run();        _polling_thread = new Thread(polling_routine,
                                      reinterpret_cast<void *>(&_polling_list),
                                      false);
         _polling_thread->run();
    }    }
    _service_count++;    _service_count++;
  
Line 186 
Line 178 
    {    {
       _stop_polling++;       _stop_polling++;
       _polling_sem.signal();       _polling_sem.signal();
       _polling_thread.join();        _polling_thread->join();
         delete _polling_thread;
       _meta_dispatcher->_shutdown_routed_queue();       _meta_dispatcher->_shutdown_routed_queue();
       delete _meta_dispatcher;       delete _meta_dispatcher;
       _meta_dispatcher = 0;       _meta_dispatcher = 0;
Line 194 
Line 187 
    }    }
    _meta_dispatcher_mutex.unlock();    _meta_dispatcher_mutex.unlock();
    _polling_list.remove(this);    _polling_list.remove(this);
    _polling_sem.signal();  
 } }
  
 void MessageQueueService::_shutdown_incoming_queue(void) void MessageQueueService::_shutdown_incoming_queue(void)


Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2