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

Diff for /pegasus/src/Pegasus/Common/Monitor.cpp between version 1.18 and 1.19

version 1.18, 2002/06/07 00:03:34 version 1.19, 2002/06/07 15:17:13
Line 62 
Line 62 
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
  
 static struct timeval create_time = {0, 50};  static struct timeval create_time = {0, 10};
 static struct timeval destroy_time = {2, 0};  static struct timeval destroy_time = {5, 0};
 static struct timeval deadlock_time = {10, 0};  static struct timeval deadlock_time = {100, 0};
   
 ThreadPool Monitor::_thread_pool(0, "Monitor", 0, 20,  
                                  create_time, destroy_time, deadlock_time);  
  
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
Line 115 
Line 112 
     FD_ZERO(&_rep->active_rd_fd_set);     FD_ZERO(&_rep->active_rd_fd_set);
     FD_ZERO(&_rep->active_wr_fd_set);     FD_ZERO(&_rep->active_wr_fd_set);
     FD_ZERO(&_rep->active_ex_fd_set);     FD_ZERO(&_rep->active_ex_fd_set);
       if( _async == true )
       {
          _thread_pool = new ThreadPool(0,
                                        "Monitor",
                                        0,
                                        20,
                                        create_time,
                                        destroy_time,
                                        deadlock_time);
       }
   
 } }
 Monitor::~Monitor() Monitor::~Monitor()
 { {
Line 134 
Line 142 
     Socket::uninitializeInterface();     Socket::uninitializeInterface();
     Tracer::trace(TRC_HTTP, Tracer::LEVEL4,     Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
                   "returning from monitor destructor");                   "returning from monitor destructor");
       delete _thread_pool;
 } }
  
  
Line 145 
Line 154 
    if( now.tv_sec - last.tv_sec > 0 )    if( now.tv_sec - last.tv_sec > 0 )
    {    {
       gettimeofday(&last, NULL);       gettimeofday(&last, NULL);
       return _thread_pool.kill_dead_threads();        return _thread_pool->kill_dead_threads();
    }    }
    return 0;    return 0;
 } }
Line 288 
Line 297 
  
                   static_cast<HTTPConnection *>(queue)->refcount++;                   static_cast<HTTPConnection *>(queue)->refcount++;
                   if( false == static_cast<HTTPConnection *>(queue)->is_dying())                   if( false == static_cast<HTTPConnection *>(queue)->is_dying())
                      _thread_pool.allocate_and_awaken((void *)queue, _dispatch);                       _thread_pool->allocate_and_awaken((void *)queue, _dispatch);
                   else                   else
                      static_cast<HTTPConnection *>(queue)->refcount--;                      static_cast<HTTPConnection *>(queue)->refcount--;
                }                }


Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2