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.
Public Member Functions | |
| ThreadPoolOptions | withThreadName (String newThreadName) const |
| The name to give each thread in the pool. | |
| ThreadPoolOptions | withNumberOfThreads (int newNumberOfThreads) const |
| The number of threads to run. | |
| ThreadPoolOptions | withThreadStackSizeBytes (size_t newThreadStackSizeBytes) const |
| The size of the stack of each thread in the pool. | |
| ThreadPoolOptions | withDesiredThreadPriority (Thread::Priority newDesiredThreadPriority) const |
| The desired priority of each thread in the pool. | |
Public Attributes | |
| String | threadName { "Pool" } |
| int | numberOfThreads { SystemStats::getNumCpus() } |
| size_t | threadStackSizeBytes { Thread::osDefaultStackSize } |
| Thread::Priority | desiredThreadPriority { Thread::Priority::normal } |
|
inlinenodiscard |
The name to give each thread in the pool.
References threadName, and juce::withMember().
|
inlinenodiscard |
The number of threads to run.
These will be started when a pool is created, and run until the pool is destroyed.
References numberOfThreads, and juce::withMember().
|
inlinenodiscard |
The size of the stack of each thread in the pool.
References threadStackSizeBytes, and juce::withMember().
|
inlinenodiscard |
The desired priority of each thread in the pool.
References desiredThreadPriority, and juce::withMember().
| String juce::ThreadPoolOptions::threadName { "Pool" } |
Referenced by withThreadName().
| int juce::ThreadPoolOptions::numberOfThreads { SystemStats::getNumCpus() } |
Referenced by withNumberOfThreads().
| size_t juce::ThreadPoolOptions::threadStackSizeBytes { Thread::osDefaultStackSize } |
Referenced by withThreadStackSizeBytes().
| Thread::Priority juce::ThreadPoolOptions::desiredThreadPriority { Thread::Priority::normal } |
Referenced by withDesiredThreadPriority().