version 1.3, 2006/11/10 18:14:58
|
version 1.5, 2008/09/17 18:47:22
|
|
|
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
// | // |
//============================================================================== |
//============================================================================= |
// | // |
//%///////////////////////////////////////////////////////////////////////////// |
//%//////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_ThreadPool_h | #ifndef Pegasus_ThreadPool_h |
#define Pegasus_ThreadPool_h | #define Pegasus_ThreadPool_h |
|
|
could not be setup properly. PEGASUS_THREAD_UNAVAILABLE | could not be setup properly. PEGASUS_THREAD_UNAVAILABLE |
if this service is shutting down and no more threads can | if this service is shutting down and no more threads can |
be allocated. | be allocated. |
@exception IPCException |
|
*/ | */ |
ThreadStatus allocate_and_awaken( | ThreadStatus allocate_and_awaken( |
void* parm, | void* parm, |
|
|
deallocate_wait configuration and more than the configured | deallocate_wait configuration and more than the configured |
minimum number of threads is running. | minimum number of threads is running. |
@return The number of threads that were cleaned up. | @return The number of threads that were cleaned up. |
@exception IPCException |
|
*/ | */ |
Uint32 cleanupIdleThreads(); | Uint32 cleanupIdleThreads(); |
| |
|
|
| |
inline Uint32 runningCount() | inline Uint32 runningCount() |
{ | { |
return _runningThreads.size(); |
return (Uint32) _runningThreads.size(); |
} | } |
| |
inline Uint32 idleCount() | inline Uint32 idleCount() |
{ | { |
return _idleThreads.size(); |
return (Uint32) _idleThreads.size(); |
} | } |
| |
private: | private: |