Go to the SVN repository for this file.
1 #ifndef PSGS_THREAD_POOL__HPP 2 #define PSGS_THREAD_POOL__HPP 46 unsigned intmax_threads)
53 if(pool ==
nullptr) {
54 PSG_ERROR(
"Null thread pool pointer; bailing.");
65 unsigned int n= (pool->GetExecutingTasksCount() +
66pool->GetQueuedTasksCount());
70}
else if(
n> pool->GetThreadsCount()) {
void OnEvent(EEvent event)
Main method for the implementation of controlling algorithm.
CPSGS_ThreadPool_Controller(unsigned int min_threads, unsigned int max_threads)
Abstract class for controlling the number of threads in pool.
EEvent
Events that can happen with ThreadPool.
void EnsureLimits(void)
Ensure that constraints of minimum and maximum count of threads in pool are met.
unsigned int GetMinThreads(void) const
Get the minimum number of threads in pool.
CThreadPool * GetPool(void) const
Get pool to which this class is attached.
unsigned int GetMaxThreads(void) const
Get the maximum number of threads in pool.
void SetMinThreads(unsigned int min_threads)
Set the minimum number of threads in pool.
@ eSuspend
ThreadPool is suspended for exclusive task execution.
Pool of generic task-executing threads.
#define PSG_ERROR(message)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4