version 1.92, 2005/02/09 19:37:32
|
version 1.93, 2005/02/11 13:20:34
|
|
|
// Author: Mike Day (mdday@us.ibm.com) | // Author: Mike Day (mdday@us.ibm.com) |
// | // |
// Modified By: | // Modified By: |
// Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090 |
// Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090,#2657 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
_thread_pool = new ThreadPool(0, "MessageQueueService", 0, 0, | _thread_pool = new ThreadPool(0, "MessageQueueService", 0, 0, |
create_time, destroy_time, deadlock_time); | create_time, destroy_time, deadlock_time); |
| |
_polling_thread = new Thread(polling_routine, |
|
reinterpret_cast<void *>(&_polling_list), |
|
false); |
|
while (!_polling_thread->run()) |
|
{ |
|
pegasus_yield(); |
|
} |
|
} | } |
_service_count++; | _service_count++; |
| |
|
|
| |
_stop_polling++; | _stop_polling++; |
_polling_sem.signal(); | _polling_sem.signal(); |
|
if (_polling_thread) { |
_polling_thread->join(); | _polling_thread->join(); |
delete _polling_thread; | delete _polling_thread; |
_polling_thread = 0; | _polling_thread = 0; |
|
} |
_meta_dispatcher->_shutdown_routed_queue(); | _meta_dispatcher->_shutdown_routed_queue(); |
delete _meta_dispatcher; | delete _meta_dispatcher; |
_meta_dispatcher = 0; | _meta_dispatcher = 0; |
|
|
{ | { |
if (_incoming_queue_shutdown.value() > 0 ) | if (_incoming_queue_shutdown.value() > 0 ) |
return false; | return false; |
|
if (_polling_thread == NULL) { |
|
_polling_thread = new Thread(polling_routine, |
|
reinterpret_cast<void *>(&_polling_list), |
|
false); |
|
while (!_polling_thread->run()) |
|
{ |
|
pegasus_yield(); |
|
} |
|
} |
// ATTN optimization remove the message checking altogether in the base | // ATTN optimization remove the message checking altogether in the base |
// << Mon Feb 18 14:02:20 2002 mdd >> | // << Mon Feb 18 14:02:20 2002 mdd >> |
op->lock(); | op->lock(); |