Represents an abstract thread. Not all threads are created through AThread - these are interfaced with AAbstractThread.
More...
#include <AUI/Thread/AThread.h>
|
typedef std::thread::id | id |
| Thread ID type.
|
|
|
id | getId () const |
|
void | enqueue (AMessageQueue<>::Message f) |
| Delivers task for execution (message) to this thread's event queue. Messages are processed by framework itself using AEventLoop. This behaviour may be overwritten using the AThread::processMessages() function.
|
|
virtual bool | isInterrupted () |
|
virtual void | resetInterruptFlag () |
| Reset interruption flag.
|
|
virtual void | interrupt () |
| Interrupt thread's execution.
|
|
IEventLoop * | getCurrentEventLoop () const |
| Get current event loop for this thread.
|
|
template<class Callable> |
void | operator<< (Callable fun) |
| Enqueue message to make.
|
|
template<class Callable> |
void | operator* (Callable fun) |
| Enqueue message to make. Helper function for async, asyncX, ui, uiX.
|
|
const AString & | threadName () const noexcept |
|
AStacktrace | threadStacktrace () const |
| Retrieve stacktrace of the thread.
|
|
bool | messageQueueEmpty () noexcept |
|
|
| AAbstractThread (const id &id) noexcept |
|
void | updateThreadName () noexcept |
|
virtual void | processMessagesImpl () |
|
Represents an abstract thread. Not all threads are created through AThread - these are interfaced with AAbstractThread.
◆ getCurrentEventLoop()
IEventLoop * AAbstractThread::getCurrentEventLoop |
( |
| ) |
const |
|
inline |
Get current event loop for this thread.
- Returns
- current event loop for this thread
◆ getId()
◆ interrupt()
void AAbstractThread::interrupt |
( |
| ) |
|
|
virtual |
◆ isInterrupted()
bool AAbstractThread::isInterrupted |
( |
| ) |
|
|
virtual |
- Returns
- true if interrupt requested for this thread.
Reimplemented in AThread.
◆ operator*()
template<class Callable>
void AAbstractThread::operator* |
( |
Callable | fun | ) |
|
|
inline |
Enqueue message to make. Helper function for async, asyncX, ui, uiX.
- Template Parameters
-
- Parameters
-
◆ operator<<()
template<class Callable>
void AAbstractThread::operator<< |
( |
Callable | fun | ) |
|
|
inline |
Enqueue message to make.
- Template Parameters
-
- Parameters
-
◆ resetInterruptFlag()
void AAbstractThread::resetInterruptFlag |
( |
| ) |
|
|
virtual |
Reset interruption flag.
Reimplemented in AThread.
The documentation for this class was generated from the following files:
- aui.core/src/AUI/Thread/AThread.h
- aui.core/src/AUI/Thread/AThread.cpp