version 1.119.12.3, 2006/06/30 02:52:01
|
version 1.120, 2006/07/11 18:39:28
|
|
|
| |
cimom *MessageQueueService::_meta_dispatcher = 0; | cimom *MessageQueueService::_meta_dispatcher = 0; |
AtomicInt MessageQueueService::_service_count(0); | AtomicInt MessageQueueService::_service_count(0); |
Mutex MessageQueueService::_xidMutex; |
IDFactory MessageQueueService::_xidFactory(1); |
Uint32 MessageQueueService::_xid = 1; |
|
Mutex MessageQueueService::_meta_dispatcher_mutex; | Mutex MessageQueueService::_meta_dispatcher_mutex; |
| |
static struct timeval deallocateWait = {300, 0}; | static struct timeval deallocateWait = {300, 0}; |
| |
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. |
_polling_list.remove(this); |
|
|
if (_get_polling_list()->contains(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) |
|
|
| |
Uint32 MessageQueueService::get_next_xid() | Uint32 MessageQueueService::get_next_xid() |
{ | { |
AutoMutex autoMut(_xidMutex); |
return _xidFactory.getID(); |
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 |