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

Diff for /pegasus/src/Pegasus/Common/Thread.cpp between version 1.30 and 1.31

version 1.30, 2003/02/13 14:53:10 version 1.31, 2003/02/20 01:42:26
Line 434 
Line 434 
    // first go thread the dead q and clean it up as much as possible    // first go thread the dead q and clean it up as much as possible
    while(_dead.count() > 0)    while(_dead.count() > 0)
    {    {
   #if !defined(PEGASUS_PLATFORM_HPUX_ACC) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU)
       PEGASUS_STD(cout) << "ThreadPool:: removing and joining dead thread" << PEGASUS_STD(endl);       PEGASUS_STD(cout) << "ThreadPool:: removing and joining dead thread" << PEGASUS_STD(endl);
   #endif
       Thread *dead = _dead.remove_first();       Thread *dead = _dead.remove_first();
       if(dead == 0)       if(dead == 0)
          throw NullPointer();          throw NullPointer();
Line 452 
Line 454 
    int i = 0;    int i = 0;
    AtomicInt needed(0);    AtomicInt needed(0);
  
   #ifdef PEGASUS_DISABLE_KILLING_HUNG_THREADS
      // This change prevents the thread pool from killing "hung" threads.
      // The definition of a "hung" thread is one that has been on the run queue
      // for longer than the time interval set when the thread pool was created.
      // Cancelling "hung" threads has proven to be problematic.
   
      // With this change the thread pool will not cancel "hung" threads.  This
      // may prevent a crash depending upon the state of the "hung" thread.  In
      // the case that the thread is actually hung, this change causes the
      // thread resources not to be reclaimed.
   
      // Idle threads, those that have not executed a routine for a time
      // interval, continue to be destroyed.  This is normal and should not
      // cause any problems.
      for( ; i < 1; i++)
   #else
    for( ; i < 2; i++)    for( ; i < 2; i++)
   #endif
    {    {
       q = map[i];       q = map[i];
       if(q->count() > 0 )       if(q->count() > 0 )
Line 553 
Line 571 
                   else                   else
                   {                   {
                      // deadlocked threads                      // deadlocked threads
   #if !defined(PEGASUS_PLATFORM_HPUX_ACC) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU)
                      PEGASUS_STD(cout) << "Killing a deadlocked thread" << PEGASUS_STD(endl);                      PEGASUS_STD(cout) << "Killing a deadlocked thread" << PEGASUS_STD(endl);
   #endif
                      th->cancel();                      th->cancel();
                      delete th;                      delete th;
                   }                   }


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2