version 1.19, 2005/06/24 19:34:26
|
version 1.20, 2005/06/29 19:48:10
|
|
|
| |
// Start a thread to read and process responses from the Provider Agent | // Start a thread to read and process responses from the Provider Agent |
ThreadStatus rtn = PEGASUS_THREAD_OK; | ThreadStatus rtn = PEGASUS_THREAD_OK; |
while ( ( rtn = MessageQueueService::get_thread_pool()->allocate_and_awaken( |
while ((rtn = MessageQueueService::get_thread_pool()-> |
this, _responseProcessor)) != PEGASUS_THREAD_OK) |
allocate_and_awaken(this, _responseProcessor)) != |
|
PEGASUS_THREAD_OK) |
{ | { |
if (rtn == PEGASUS_THREAD_INSUFFICIENT_RESOURCES) | if (rtn == PEGASUS_THREAD_INSUFFICIENT_RESOURCES) |
|
{ |
pegasus_yield(); | pegasus_yield(); |
|
} |
else | else |
{ | { |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
Logger::put( |
"Not enough threads to process responses from the provider agent."); |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"Not enough threads to process responses from the " |
|
"provider agent."); |
| |
Tracer::trace(TRC_PROVIDERMANAGER, Tracer::LEVEL2, | Tracer::trace(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Could not allocate thread to process responses from the provider agent."); |
"Could not allocate thread to process responses from the " |
break; |
"provider agent."); |
|
|
|
throw Exception(MessageLoaderParms( |
|
"ProviderManager.OOPProviderManagerRouter." |
|
"CIMPROVAGT_THREAD_ALLOCATION_FAILED", |
|
"Failed to allocate thread for cimprovagt \"$0\".", |
|
_moduleName)); |
} | } |
} | } |
} | } |
catch (...) | catch (...) |
{ | { |
|
// Closing the connection causes the agent process to exit |
|
_pipeToAgent.reset(); |
|
_pipeFromAgent.reset(); |
|
|
#if defined(PEGASUS_HAS_SIGNALS) | #if defined(PEGASUS_HAS_SIGNALS) |
if (_isInitialized) | if (_isInitialized) |
{ | { |
|
|
#endif | #endif |
| |
_isInitialized = false; | _isInitialized = false; |
_pipeToAgent.reset(); |
|
_pipeFromAgent.reset(); |
|
| |
{ | { |
AutoMutex lock(_numProviderProcessesMutex); | AutoMutex lock(_numProviderProcessesMutex); |