cmn_ThreadCounter Class Reference
[Common, basic classes, functions and types]

#include <thread.h>

Collaboration diagram for cmn_ThreadCounter:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 434 of file thread.h.


Public Member Functions

 cmn_ThreadCounter ()
int GetCount () const
void Inc ()
void Dec ()
void WaitAllEnd ()

Private Attributes

 log_CLASSID_m
int m_threadCounter
cmn_Mutex m_threadCounter_x
cmn_Condition m_allThreadFinished

Constructor & Destructor Documentation

cmn_ThreadCounter::cmn_ThreadCounter (  ) 

Definition at line 517 of file cmn_thread.cpp.

00518   : m_threadCounter(0),
00519     m_allThreadFinished(&m_threadCounter_x) {
00520         //empty
00521     }


Member Function Documentation

int cmn_ThreadCounter::GetCount (  )  const

Definition at line 524 of file cmn_thread.cpp.

References m_threadCounter, and m_threadCounter_x.

Referenced by i_BackEndAgent_i::Migrate(), and i_BackEndAgent_i::Recall().

00524                                       {
00525     cmn_MutexLock l(m_threadCounter_x);
00526     return m_threadCounter;
00527 }

Here is the caller graph for this function:

void cmn_ThreadCounter::Inc (  ) 

void cmn_ThreadCounter::Dec (  ) 

void cmn_ThreadCounter::WaitAllEnd (  ) 

Definition at line 548 of file cmn_thread.cpp.

References cmn_Thread::GetTime(), m_allThreadFinished, m_threadCounter, m_threadCounter_x, and cmn_Condition::TimedWait().

Referenced by i_RecallJob_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_BackEndAgent_i::~i_BackEndAgent_i(), and i_Job_i::~i_Job_i().

00548                                    {
00549     cmn_MutexLock l(m_threadCounter_x);
00550     while (m_threadCounter > 0) {
00551         m_allThreadFinished.TimedWait(cmn_Thread::GetTime(1));
00552     }
00553 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 445 of file thread.h.

Definition at line 447 of file thread.h.

Referenced by Dec(), GetCount(), Inc(), and WaitAllEnd().

Definition at line 448 of file thread.h.

Referenced by Dec(), GetCount(), Inc(), and WaitAllEnd().

Definition at line 449 of file thread.h.

Referenced by Dec(), and WaitAllEnd().


The documentation for this class was generated from the following files:

Generated on Mon Feb 27 19:05:41 2012 for OPENARCHIVE by  doxygen 1.5.6