![]() |
ULIS
dev4.0.7
Utility Library for Imaging Systems
|
The FThreadPool class provides a way to hold a thread pool with several threads running and waiting for commands, with no overhead related to thread launching and joining. More...
Public Member Functions | |
FThreadPool (const FThreadPool &)=delete | |
FThreadPool (uint32 iNumWorkers=MaxWorkers()) | |
~FThreadPool () | |
uint32 | GetNumWorkers () const |
FThreadPool & | operator= (const FThreadPool &)=delete |
void | SetNumWorkers (uint32 iNumWorkers) |
void | WaitForCompletion () |
Static Public Member Functions | |
static uint32 | MaxWorkers () |
Friends | |
class | FCommandQueue_Private |
The FThreadPool holds a certain number of threads which actual implementation is irrelevant ( wether the backend is Posix threads, Intel TBB, or no thread support at all ). If the system doesn't support multithreading, the FThreadPool emulates a multithreaded behaviour anyway with no change to application logic, but it processes it in a linear monothreaded fashion.
FThreadPool::~FThreadPool | ( | ) |
FThreadPool::FThreadPool | ( | uint32 | iNumWorkers = MaxWorkers() | ) |
|
delete |
uint32 FThreadPool::GetNumWorkers | ( | ) | const |
|
static |
|
delete |
void FThreadPool::SetNumWorkers | ( | uint32 | iNumWorkers | ) |
void FThreadPool::WaitForCompletion | ( | ) |
|
friend |