OpenShot Audio Library | OpenShotAudio: juce::ThreadPoolOptions Struct Reference

OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
juce::ThreadPoolOptions Struct Reference

`#include <juce_ThreadPool.h>`

## Public Member Functions
ThreadPoolOptions | withThreadName (String newThreadName) const
ThreadPoolOptions | withNumberOfThreads (int newNumberOfThreads) const
ThreadPoolOptions | withThreadStackSizeBytes (size_t newThreadStackSizeBytes) const
ThreadPoolOptions | withDesiredThreadPriority (Thread::Priority newDesiredThreadPriority) const

## Public Attributes
String | threadName { "Pool" }
int | numberOfThreads { SystemStats::getNumCpus() }
size_t | threadStackSizeBytes { Thread::osDefaultStackSize }
Thread::Priority | desiredThreadPriority { Thread::Priority::normal }

## Detailed Description

A set of threads that will run a list of jobs.

When a ThreadPoolJob object is added to the ThreadPool's list, its runJob() method will be called by the next pooled thread that becomes free.

See also
  ThreadPoolJob, Thread

Definition at line 154 of file juce_ThreadPool.h.

## Member Function Documentation

## ◆ withDesiredThreadPriority()

ThreadPoolOptions juce::ThreadPoolOptions::withDesiredThreadPriority | ( | Thread::Priority | newDesiredThreadPriority | ) | const
| inlinenodiscard

The desired priority of each thread in the pool.

Definition at line 177 of file juce_ThreadPool.h.

## ◆ withNumberOfThreads()

ThreadPoolOptions juce::ThreadPoolOptions::withNumberOfThreads | ( | int | newNumberOfThreads | ) | const
| inlinenodiscard

The number of threads to run. These will be started when a pool is created, and run until the pool is destroyed.

Definition at line 165 of file juce_ThreadPool.h.

## ◆ withThreadName()

ThreadPoolOptions juce::ThreadPoolOptions::withThreadName | ( | String | newThreadName | ) | const
| inlinenodiscard

The name to give each thread in the pool.

Definition at line 157 of file juce_ThreadPool.h.

## ◆ withThreadStackSizeBytes()

ThreadPoolOptions juce::ThreadPoolOptions::withThreadStackSizeBytes | ( | size_t | newThreadStackSizeBytes | ) | const
| inlinenodiscard

The size of the stack of each thread in the pool.

Definition at line 171 of file juce_ThreadPool.h.

## Member Data Documentation

## ◆ desiredThreadPriority

Thread::Priority juce::ThreadPoolOptions::desiredThreadPriority { Thread::Priority::normal }

Definition at line 185 of file juce_ThreadPool.h.

## ◆ numberOfThreads

int juce::ThreadPoolOptions::numberOfThreads { SystemStats::getNumCpus() }

Definition at line 183 of file juce_ThreadPool.h.

## ◆ threadName

String juce::ThreadPoolOptions::threadName { "Pool" }

Definition at line 182 of file juce_ThreadPool.h.

## ◆ threadStackSizeBytes

size_t juce::ThreadPoolOptions::threadStackSizeBytes { Thread::osDefaultStackSize }

Definition at line 184 of file juce_ThreadPool.h.

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

- juce_ThreadPool.h