THREADPOOLATTR Struct Reference

`#include <ThreadPool.h>`

## Data Fields

int | minThreads
int | maxThreads
size_t | stackSize
int | maxIdleTime
int | jobsPerThread
int | maxJobsTotal
int | starvationTime
PolicyType | schedPolicy

## Detailed Description

Attributes for thread pool. Used to set and change parameters of thread pool.

## Field Documentation

## jobsPerThread

int THREADPOOLATTR::jobsPerThread

Jobs per thread to maintain.

Referenced by AddWorker(), TPAttrInit(), and TPAttrSetJobsPerThread().

## maxIdleTime

int THREADPOOLATTR::maxIdleTime

This is the maximum time a thread will remain idle before dying (in milliseconds).

Referenced by BumpPriority(), TPAttrInit(), TPAttrSetIdleTime(), and WorkerThread().

## maxJobsTotal

int THREADPOOLATTR::maxJobsTotal

Maximum number of jobs that can be queued totally.

Referenced by ThreadPoolAdd(), TPAttrInit(), and TPAttrSetMaxJobsTotal().

## maxThreads

int THREADPOOLATTR::maxThreads

ThreadPool will never have more than this number of threads.

Referenced by CreateWorker(), ThreadPoolAddPersistent(), TPAttrInit(), TPAttrSetMaxThreads(), and WorkerThread().

## minThreads

int THREADPOOLATTR::minThreads

ThreadPool will always maintain at least this many threads.

Referenced by ThreadPoolInit(), ThreadPoolSetAttr(), TPAttrInit(), TPAttrSetMinThreads(), and WorkerThread().

## schedPolicy

PolicyType THREADPOOLATTR::schedPolicy

scheduling policy to use.

Referenced by ThreadPoolInit(), ThreadPoolSetAttr(), TPAttrInit(), and TPAttrSetSchedPolicy().

## stackSize

size_t THREADPOOLATTR::stackSize

This is the minimum stack size allocated for each thread.

Referenced by CreateWorker(), TPAttrInit(), and TPAttrSetStackSize().

## starvationTime

int THREADPOOLATTR::starvationTime

the time a low priority or med priority job waits before getting bumped up a priority (in milliseconds).

Referenced by BumpPriority(), TPAttrInit(), and TPAttrSetStarvationTime().

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

- /build/pupnp-fsDV9p/pupnp-1.14.25/upnp/src/threadutil/ThreadPool.h