Logo Search packages:      
Sourcecode: libupnp4 version File versions  Download package

THREADPOOL Struct Reference

#include <ThreadPool.h>

List of all members.

Detailed Description

A thread pool similar to the thread pool in the UPnP SDK.

Allows jobs to be scheduled for running by threads in a thread pool. The thread pool is initialized with a minimum and maximum thread number as well as a max idle time and a jobs per thread ratio. If a worker thread waits the whole max idle time without receiving a job and the thread pool currently has more threads running than the minimum then the worker thread will exit. If when scheduling a job the current job to thread ratio becomes greater than the set ratio and the thread pool currently has less than the maximum threads then a new thread will be created.

Definition at line 261 of file ThreadPool.h.

Public Attributes

ThreadPoolAttr attr
ithread_cond_t condition
LinkedList highJobQ
FreeList jobFreeList
int lastJobId
LinkedList lowJobQ
LinkedList medJobQ
ithread_mutex_t mutex
ThreadPoolJob * persistentJob
int persistentThreads
int shutdown
ithread_cond_t start_and_shutdown
ThreadPoolStats stats
int totalThreads

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index