version 1.82.6.1, 2003/10/29 22:09:18
|
version 1.85, 2003/11/07 19:18:46
|
|
|
| |
} | } |
} | } |
exit_thread((PEGASUS_THREAD_RETURN)dead_threads); |
|
return (PEGASUS_THREAD_RETURN)dead_threads; | return (PEGASUS_THREAD_RETURN)dead_threads; |
} | } |
| |
|
|
if(_check_idle_flag.value() != 0 ) | if(_check_idle_flag.value() != 0 ) |
{ | { |
_check_idle_flag = 0; | _check_idle_flag = 0; |
Thread th(kill_idle_threads, 0, true); |
|
th.run(); |
// If there are insufficent resources to run |
|
// kill_idle_threads, then just return. |
|
_thread_pool->allocate_and_awaken(service, kill_idle_threads); |
} | } |
} | } |
myself->exit_self( (PEGASUS_THREAD_RETURN) 1 ); | myself->exit_self( (PEGASUS_THREAD_RETURN) 1 ); |
|
|
MessageQueueService::MessageQueueService(const char *name, | MessageQueueService::MessageQueueService(const char *name, |
Uint32 queueID, | Uint32 queueID, |
Uint32 capabilities, | Uint32 capabilities, |
Uint32 mask, |
Uint32 mask) |
int threads) |
|
: Base(name, true, queueID), | : Base(name, true, queueID), |
| |
_mask(mask), | _mask(mask), |
|
|
_meta_dispatcher_mutex.unlock(); | _meta_dispatcher_mutex.unlock(); |
throw NullPointer(); | throw NullPointer(); |
} | } |
_thread_pool = new ThreadPool(0, "MessageQueueService", 0, threads, |
_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, | _polling_thread = new Thread(polling_routine, |
reinterpret_cast<void *>(&_polling_list), | reinterpret_cast<void *>(&_polling_list), |
false); | false); |
_polling_thread->run(); |
while (!_polling_thread->run()) |
|
{ |
|
pegasus_yield(); |
|
} |
} | } |
_service_count++; | _service_count++; |
| |
|
|
| |
| |
| |
void MessageQueueService::enqueue(Message *msg) throw(IPCException) |
void MessageQueueService::enqueue(Message *msg) |
{ | { |
PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE, "MessageQueueService::enqueue()"); | PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE, "MessageQueueService::enqueue()"); |
| |