PLCnext API Documentation
21.0.0.35466
|
Worker threads repeat the execution of the threaded code until Stop is called. More...
#include <WorkerThread.hpp>
Public Types | |
typedef delegate< void(void)> | WorkDelegate |
The delegate of threads loop body. More... | |
Public Member Functions | |
template<class TInstance , class TFunction > | |
WorkerThread (TInstance &instance, TFunction fn, int idleTime, const char *threadName) | |
Constructs an WorkerThread instance for a class method. More... | |
template<class TInstance , class TFunction > | |
WorkerThread (const TInstance &instance, TFunction fn, int idleTime, const char *threadName) | |
Constructs an WorkerThread instance for a class method. More... | |
template<class TInstance , class TFunction > | |
WorkerThread (TInstance *pInstance, TFunction fn, int idleTime, const char *threadName) | |
Constructs an WorkerThread instance for a class method. More... | |
template<class TInstance , class TFunction > | |
WorkerThread (const TInstance *pInstance, TFunction fn, int idleTime, const char *threadName) | |
Constructs an WorkerThread instance for a class method. More... | |
template<class TInstance , class TFunction > | |
WorkerThread (ThreadSettings &settings, TInstance &instance, TFunction fn, int idleTime) | |
Constructs an WorkerThread instance. More... | |
template<class TInstance , class TFunction > | |
WorkerThread (ThreadSettings &settings, const TInstance &instance, TFunction fn, int idleTime) | |
Constructs an WorkerThread instance. More... | |
template<class TInstance , class TFunction > | |
WorkerThread (ThreadSettings &settings, TInstance *pInstance, TFunction fn, int idleTime) | |
Constructs an WorkerThread instance. More... | |
template<class TInstance , class TFunction > | |
WorkerThread (ThreadSettings &settings, const TInstance *pInstance, TFunction fn, int idleTime) | |
Constructs an WorkerThread instance. More... | |
WorkerThread (WorkDelegate &&loopDelegate, int idleTime, const char *threadName) | |
Constructs an WorkerThread instance. More... | |
WorkerThread (ThreadSettings &settings, WorkDelegate &&loopDelegate, int idleTime) | |
Constructs an WorkerThread instance. More... | |
~WorkerThread (void)=default | |
Deallocates the memory used for this instance but does not quit the thread. More... | |
bool | IsRunning (void) const |
Checks if the thread is in running state. More... | |
void | Start (void) |
Starts the execution of the thread. More... | |
void | Stop (void) |
Stops the execution of the thread syncronously. More... | |
Worker threads repeat the execution of the threaded code until Stop is called.
typedef delegate<void(void)> Arp::System::Commons::Threading::WorkerThread::WorkDelegate |
The delegate of threads loop body.
|
inline |
Constructs an WorkerThread instance for a class method.
instance | Instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
threadName | The name of the thread. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance for a class method.
instance | Instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
threadName | The name of the thread. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance for a class method.
pInstance | Pointer to instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
threadName | The name of the thread. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance for a class method.
instance | Pointer to instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
threadName | The name of the thread. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance.
settings | Reference to custom thread parameters. |
instance | Instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance.
settings | Reference to custom thread parameters. |
instance | Instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance.
settings | Reference to custom thread parameters. |
pInstance | Pointer to instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance.
settings | Reference to custom thread parameters. |
pInstance | Pointer to instance of object whichs method should be executed in separate thread. |
fn | Pointer to method that should be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inlineexplicit |
Constructs an WorkerThread instance.
loopDelegate | Loop body delegate to be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
threadName | The name of the thread. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
inline |
Constructs an WorkerThread instance.
settings | Reference to custom thread parameters. |
loopDelegate | Loop body delegate to be executed in each thread loop. |
idleTimeArg | The idle time in ms. |
Arp::System::Commons::InvalidOperationException | if the thread could not be created. |
|
default |
Deallocates the memory used for this instance but does not quit the thread.
|
inline |
Checks if the thread is in running state.
Determines if this thread is in running state.
void Arp::System::Commons::Threading::WorkerThread::Start | ( | void | ) |
Starts the execution of the thread.
void Arp::System::Commons::Threading::WorkerThread::Stop | ( | void | ) |
Stops the execution of the thread syncronously.