GestureRecognitionToolkit  Version: 0.2.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
GRT::ThreadPool Class Reference

Public Member Functions

 ThreadPool ()
 
 ThreadPool (const unsigned int numThreads)
 
 ~ThreadPool ()
 

Static Public Member Functions

static unsigned int getThreadPoolSize ()
 
static bool setThreadPoolSize (const unsigned int threadPoolSize)
 

Detailed Description

Definition at line 52 of file ThreadPool.h.

Constructor & Destructor Documentation

ThreadPool::ThreadPool ( )

Default Constructor. If this constructor is used, the number of threads will automatically be set to the current thread pool size.

Definition at line 12 of file ThreadPool.cpp.

ThreadPool::ThreadPool ( const unsigned int  numThreads)

If this constructor is used, the number of threads will be set to the numThreads value.

Parameters
constunsigned int numThreads: sets the number of threads in the thread pool.

Definition at line 20 of file ThreadPool.cpp.

ThreadPool::~ThreadPool ( )

Default Destructor. Waits for all threads to finish their current tasks.

Definition at line 29 of file ThreadPool.cpp.

Member Function Documentation

unsigned int ThreadPool::getThreadPoolSize ( )
static

This function returns the current thread limit. This defaults to the number of threads set by std::thread::hardware_concurrency(), but the user can override this value if needed using the setThreadLimit(...) function.

Returns
returns the number of concurrent threads either (i) supported by the implementation, or (ii) set by the user.

Definition at line 78 of file ThreadPool.cpp.

bool ThreadPool::setThreadPoolSize ( const unsigned int  threadPoolSize)
static

This function sets the current thread limit. This defaults to the number of threads set by std::thread::hardware_concurrency(), but the user can override this value using this function.

Returns
returns ture if the value was updated, false otherwise

Definition at line 86 of file ThreadPool.cpp.


The documentation for this class was generated from the following files: