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(), and TPAttrSetIdleTime().

## maxJobsTotal

int THREADPOOLATTR::maxJobsTotal

Maximum number of jobs that can be queued totally.

Referenced by TPAttrSetMaxJobsTotal().

## maxThreads

int THREADPOOLATTR::maxThreads

ThreadPool will never have more than this number of threads.

Referenced by TPAttrInit(), and TPAttrSetMaxThreads().

## minThreads

int THREADPOOLATTR::minThreads

ThreadPool will always maintain at least this many threads.

Referenced by TPAttrInit(), and TPAttrSetMinThreads().

## schedPolicy

PolicyType THREADPOOLATTR::schedPolicy

scheduling policy to use.

Referenced by TPAttrInit(), and TPAttrSetSchedPolicy().

## stackSize

size_t THREADPOOLATTR::stackSize

This is the minimum stack size allocated for each thread.

Referenced by 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(), and TPAttrSetStarvationTime().

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

- upnp/src/threadutil/ThreadPool.h