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

Diff for /pegasus/src/Pegasus/Common/ThreadPool.h between version 1.1.2.1 and 1.5

version 1.1.2.1, 2006/07/29 15:54:07 version 1.5, 2008/09/17 18:47:22
Line 27 
Line 27 
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 //==============================================================================  //=============================================================================
 // //
 // Author: Mike Day (mdday@us.ibm.com)  //%////////////////////////////////////////////////////////////////////////////
 //  
 // Modified By: Markus Mueller  
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101  
 //              David Dillard, VERITAS Software Corp.  
 //                  (david.dillard@veritas.com)  
 //              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)  
 //              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2393  
 //  
 //%/////////////////////////////////////////////////////////////////////////////  
  
 #ifndef Pegasus_ThreadPool_h #ifndef Pegasus_ThreadPool_h
 #define Pegasus_ThreadPool_h #define Pegasus_ThreadPool_h
Line 68 
Line 58 
         @param deallocateWait The minimum time that a thread should be idle         @param deallocateWait The minimum time that a thread should be idle
             before it is removed from the pool and cleaned up.             before it is removed from the pool and cleaned up.
      */      */
     ThreadPool(Sint16 initialSize,      ThreadPool(
           Sint16 initialSize,
                const char *key,                const char *key,
                Sint16 minThreads,                Sint16 minThreads,
                Sint16 maxThreads, struct timeval &deallocateWait);          Sint16 maxThreads,
           struct timeval& deallocateWait);
  
     /**     /**
         Destructs the ThreadPool object.         Destructs the ThreadPool object.
Line 93 
Line 85 
                 could not be setup properly. PEGASUS_THREAD_UNAVAILABLE                 could not be setup properly. PEGASUS_THREAD_UNAVAILABLE
                 if this service is shutting down and no more threads can                 if this service is shutting down and no more threads can
                 be allocated.                 be allocated.
         @exception IPCException  
      */      */
     ThreadStatus allocate_and_awaken(void *parm,      ThreadStatus allocate_and_awaken(
                                      ThreadReturnType(PEGASUS_THREAD_CDECL *          void* parm,
                                                       work) (void *),          ThreadReturnType(PEGASUS_THREAD_CDECL* work) (void*),
                                      Semaphore * blocking = 0);                                      Semaphore * blocking = 0);
  
     /**     /**
Line 105 
Line 96 
         deallocate_wait configuration and more than the configured         deallocate_wait configuration and more than the configured
         minimum number of threads is running.         minimum number of threads is running.
         @return The number of threads that were cleaned up.         @return The number of threads that were cleaned up.
         @exception IPCException  
      */      */
     Uint32 cleanupIdleThreads();     Uint32 cleanupIdleThreads();
  
Line 133 
Line 123 
  
     inline Uint32 runningCount()     inline Uint32 runningCount()
     {     {
         return _runningThreads.size();          return (Uint32) _runningThreads.size();
     }     }
  
     inline Uint32 idleCount()     inline Uint32 idleCount()
     {     {
         return _idleThreads.size();          return (Uint32) _idleThreads.size();
     }     }
  
 private: private:
Line 149 
Line 139 
  
     static ThreadReturnType PEGASUS_THREAD_CDECL _loop(void *);     static ThreadReturnType PEGASUS_THREAD_CDECL _loop(void *);
  
     static Boolean _timeIntervalExpired(struct timeval *start,      static Boolean _timeIntervalExpired(
           struct timeval* start,
                                         struct timeval *interval);                                         struct timeval *interval);
  
     static void _deleteSemaphore(void *p);     static void _deleteSemaphore(void *p);


Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2