version 1.19, 2002/02/18 17:41:18
|
version 1.20, 2002/02/18 22:52:26
|
|
|
| |
} | } |
| |
|
void MessageQueueService::default_async_callback(AsyncOpNode *op, |
|
MessageQueueService *mq, |
|
void *parm) |
|
{ |
|
PEGASUS_ASSERT(op != 0 && mq != 0 ); |
|
op->complete(); |
|
return; |
|
} |
|
|
|
|
| |
PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(void * parm) | PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(void * parm) |
{ | { |
|
|
if (_incoming_queue_shutdown.value() > 0 ) | if (_incoming_queue_shutdown.value() > 0 ) |
return false; | return false; |
| |
|
// ATTN optimization remove the message checking altogether in the base |
|
// << Mon Feb 18 14:02:20 2002 mdd >> |
op->lock(); | op->lock(); |
Message *rq = op->_request.next(0); | Message *rq = op->_request.next(0); |
|
Message *rp = op->_response.next(0); |
op->unlock(); | op->unlock(); |
| |
if( true == messageOK(rq) && _die.value() == 0 ) |
if( ((true == messageOK(rq)) || ( true == messageOK(rp) )) && _die.value() == 0 ) |
{ | { |
_incoming.insert_last_wait(op); | _incoming.insert_last_wait(op); |
return true; | return true; |
|
|
op = (static_cast<AsyncMessage *>(msg))->op ; | op = (static_cast<AsyncMessage *>(msg))->op ; |
} | } |
if( op == 0 ) | if( op == 0 ) |
|
{ |
op = get_op(); | op = get_op(); |
|
|
op->_request.insert_first(msg); | op->_request.insert_first(msg); |
|
} |
|
|
op->_state &= ~ASYNC_OPSTATE_COMPLETE; | op->_state &= ~ASYNC_OPSTATE_COMPLETE; |
op->_flags &= ASYNC_OPFLAGS_FIRE_AND_FORGET; | op->_flags &= ASYNC_OPFLAGS_FIRE_AND_FORGET; |
op->put_response(0); | op->put_response(0); |