version 1.119.12.6, 2006/06/30 20:07:50
|
version 1.119.12.7, 2006/06/30 20:25:43
|
|
|
| |
ThreadPool *MessageQueueService::_thread_pool = 0; | ThreadPool *MessageQueueService::_thread_pool = 0; |
| |
List<MessageQueueService, RecursiveMutex> MessageQueueService::_polling_list; |
MessageQueueService::PollingList* MessageQueueService::_polling_list; |
|
Mutex MessageQueueService::_polling_list_mutex; |
| |
Thread* MessageQueueService::_polling_thread = 0; | Thread* MessageQueueService::_polling_thread = 0; |
| |
|
|
throw BindFailedException(parms); | throw BindFailedException(parms); |
} | } |
| |
_polling_list.insert_back(this); |
_get_polling_list()->insert_back(this); |
| |
} | } |
| |
|
|
// ATTN: added to prevent assertion in List in which the list does not | // ATTN: added to prevent assertion in List in which the list does not |
// contain this element. | // contain this element. |
| |
if (_polling_list.contains(this)) |
if (_get_polling_list()->contains(this)) |
_polling_list.remove(this); |
_get_polling_list()->remove(this); |
| |
// ATTN: The code for closing the _incoming queue | // ATTN: The code for closing the _incoming queue |
// is not working correctly. In OpenPegasus 2.5, | // is not working correctly. In OpenPegasus 2.5, |
|
|
{ | { |
_polling_thread = new Thread( | _polling_thread = new Thread( |
polling_routine, | polling_routine, |
reinterpret_cast<void *>(&_polling_list), |
reinterpret_cast<void *>(_get_polling_list()), |
false); | false); |
ThreadStatus tr = PEGASUS_THREAD_OK; | ThreadStatus tr = PEGASUS_THREAD_OK; |
while ( (tr =_polling_thread->run()) != PEGASUS_THREAD_OK) | while ( (tr =_polling_thread->run()) != PEGASUS_THREAD_OK) |
|
|
return ++_xid; | return ++_xid; |
} | } |
| |
|
MessageQueueService::PollingList* MessageQueueService::_get_polling_list() |
|
{ |
|
_polling_list_mutex.lock(); |
|
|
|
if (!_polling_list) |
|
_polling_list = new PollingList; |
|
|
|
_polling_list_mutex.unlock(); |
|
|
|
return _polling_list; |
|
} |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |