ULIS  dev4.0.7
Utility Library for Imaging Systems
Public Member Functions | Static Public Member Functions | Friends | List of all members
FThreadPool Class Reference

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
 
FThreadPooloperator= (const FThreadPool &)=delete
 
void SetNumWorkers (uint32 iNumWorkers)
 
void WaitForCompletion ()
 

Static Public Member Functions

static uint32 MaxWorkers ()
 

Friends

class FCommandQueue_Private
 

Detailed Description

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.

See also
FCPUInfo
FCommandQueue

Constructor & Destructor Documentation

◆ ~FThreadPool()

FThreadPool::~FThreadPool ( )

◆ FThreadPool() [1/2]

FThreadPool::FThreadPool ( uint32  iNumWorkers = MaxWorkers())

◆ FThreadPool() [2/2]

FThreadPool::FThreadPool ( const FThreadPool )
delete

Member Function Documentation

◆ GetNumWorkers()

uint32 FThreadPool::GetNumWorkers ( ) const

◆ MaxWorkers()

static uint32 FThreadPool::MaxWorkers ( )
static

◆ operator=()

FThreadPool& FThreadPool::operator= ( const FThreadPool )
delete

◆ SetNumWorkers()

void FThreadPool::SetNumWorkers ( uint32  iNumWorkers)

◆ WaitForCompletion()

void FThreadPool::WaitForCompletion ( )

Friends And Related Function Documentation

◆ FCommandQueue_Private

friend class FCommandQueue_Private
friend