Public Member Functions | Private Member Functions | Private Attributes | Friends

rm_QueueExecutor Class Reference
[Resource Manager]

#include <rm.h>

Inheritance diagram for rm_QueueExecutor:
Inheritance graph
[legend]
Collaboration diagram for rm_QueueExecutor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 rm_QueueExecutor (rm_Queue &a_queue)

Private Member Functions

 ~rm_QueueExecutor ()
virtual void Run (void *arg)

Private Attributes

rm_Queuem_queue
 log_CLASSID_m

Friends

class rm_Queue

Detailed Description

Definition at line 321 of file rm.h.


Constructor & Destructor Documentation

rm_QueueExecutor::rm_QueueExecutor ( rm_Queue a_queue  ) 

Definition at line 789 of file rm_queue.cpp.

References dbg_LOW, log_DBG_m, and log_FUNC_m.

    :m_queue(a_queue) {
    log_FUNC_m(rm_QueueExecutor);
    log_DBG_m(dbg_LOW,"Resource Allocation Queue Thread started");

}

rm_QueueExecutor::~rm_QueueExecutor (  )  [private]

Definition at line 796 of file rm_queue.cpp.

References dbg_LOW, log_DBG_m, log_FUNC_m, m_queue, and rm_Queue::m_queueActive.

                                    {
    log_FUNC_m(~rm_QueueExecutor);
    log_DBG_m(dbg_LOW,"Resource Allocation Queue Thread ended");
    m_queue.m_queueActive = false;
}


Member Function Documentation

void rm_QueueExecutor::Run ( void *  arg  )  [private, virtual]

Reimplemented from cmn_Thread.

Definition at line 803 of file rm_queue.cpp.

References dbg_DETAIL, log_DBG_m, log_ERR_m, log_FUNC_m, rm_Queue::m_activateQueue_s, rm_Queue::m_disable, m_queue, rm_Queue::m_queue_x, rm_Queue::Process(), and cmn_Semaphore::Wait().

                                    {
    log_FUNC_m(Run);

    while(!m_queue.m_disable) {
        try {
            log_DBG_m(dbg_DETAIL, "Locking Queue");
            cmn_MutexLock l(m_queue.m_queue_x);
            m_queue.Process();
            log_DBG_m(dbg_DETAIL, "Unlocking Queue");
        } catch (ivd_Exception& e) {
            log_ERR_m(e);
        }

        log_DBG_m(dbg_DETAIL, "Waiting for rm_QueueExecutor activation");

        m_queue.m_activateQueue_s->Wait();

        log_DBG_m(dbg_DETAIL, "rm_QueueExecutor activated will process now");
    }
    log_DBG_m(dbg_DETAIL, "QUEUE DISABLED, WILL END THREAD NOW!!!");
}

Here is the call graph for this function:


Friends And Related Function Documentation

friend class rm_Queue [friend]

Definition at line 324 of file rm.h.


Member Data Documentation

Reimplemented from cmn_Thread.

Definition at line 335 of file rm.h.

Definition at line 333 of file rm.h.

Referenced by Run(), and ~rm_QueueExecutor().


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