Esempio n. 1
0
MessageQueue::~MessageQueue()
{
    // ATTN-A: thread safety!
    PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE,"MessageQueue::~MessageQueue()");
    Tracer::trace(TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL3,
        "MessageQueue::~MessageQueue queueId = %i, name = %s", _queueId, _name);

    {
        AutoMutex autoMut(q_table_mut);
        _queueTable.remove(_queueId);
    } // mutex unlocks here

    // Free the name:

    delete [] _name;

    while(_front)
    {
       Message* tmp = _front;
       _front = _front->_next;
       delete tmp;
    }

    PEG_METHOD_EXIT();
}
Esempio n. 2
0
MessageQueue::~MessageQueue()
{
    // ATTN-A: thread safety!
    PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE,"MessageQueue::~MessageQueue()");
    PEG_TRACE((TRC_MESSAGEQUEUESERVICE, Tracer::LEVEL3,
        "MessageQueue::~MessageQueue queueId = %i, name = %s",
        _queueId,
        _name));

    {
        AutoMutex autoMut(q_table_mut);
        _queueTable.remove(_queueId);
    } // mutex unlocks here

    // Free the name:

    delete [] _name;

    // Return the queue id.

    putQueueId(_queueId);

    PEG_METHOD_EXIT();
}
Esempio n. 3
0
void MessageQueue::remove_myself(Uint32 qid)
{
    AutoMutex autoMut(q_table_mut);
    _queueTable.remove(qid);
}