#include <Thread.h>
Implements a platform independent minimal thread.
Remark: This class is intended to be only used in icl_core::logging. Use icl_core::thread::Thread in your applications instead.
Definition at line 46 of file icl_core_logging/Thread.h.
Creates a new thread with the description and priority. If the priority is negative and LXRT is available, the thread is scheduled in hard-realtime.
Definition at line 42 of file icl_core_logging/Thread.cpp.
icl_core::logging::Thread::~Thread |
( |
| ) |
|
|
virtual |
bool icl_core::logging::Thread::execute |
( |
| ) |
const |
|
inline |
Call this from inside the thread code, if you want to check, wether the thread was demanded to stop from outside.
- Returns
false
if the thread has been asked to stop, true
otherwise.
Definition at line 64 of file icl_core_logging/Thread.h.
void icl_core::logging::Thread::join |
( |
| ) |
|
virtual void icl_core::logging::Thread::run |
( |
| ) |
|
|
pure virtual |
This is the function running in the thread. This has to be reimplemented from derived classes. If you start the thread by calling Start() this function is executed in the thread. If you call don't want that function to be executed in the thread you could call it directly in your derived class.
Implemented in icl_core::logging::LogOutputStream::WorkerThread.
bool icl_core::logging::Thread::running |
( |
| ) |
const |
|
inline |
void icl_core::logging::Thread::runThread |
( |
| ) |
|
|
privatevirtual |
bool icl_core::logging::Thread::start |
( |
| ) |
|
Starts the thread.
- Returns
true
if the thread has been started successfully, false
if an error occured while starting the thread.
Definition at line 94 of file icl_core_logging/Thread.cpp.
void icl_core::logging::Thread::stop |
( |
| ) |
|
|
inline |
Cooperatively stops the thread.
The thread's main loop must continuously check if the thread has been stopped by calling isStopped().
Definition at line 94 of file icl_core_logging/Thread.h.
void icl_core::logging::Thread::waitStarted |
( |
| ) |
const |
|
private |
bool icl_core::logging::Thread::m_execute |
|
private |
bool icl_core::logging::Thread::m_finished |
|
private |
bool icl_core::logging::Thread::m_joined |
|
private |
bool icl_core::logging::Thread::m_starting |
|
private |
The documentation for this class was generated from the following files: