Represents an abstract thread. Not all threads are created through AThread - these are interfaced with AAbstractThread.
#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.
|
| |
|
const AMessageQueue & | messageQueue () const |
| |
| 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 () |
| |
◆ getCurrentEventLoop()#
| IEventLoop * AAbstractThread::getCurrentEventLoop |
( |
| ) |
const |
|
inline |
- Returns
- current event loop for this thread
◆ getId()#
| id AAbstractThread::getId |
( |
| ) |
const |
◆ interrupt()#
| virtual void AAbstractThread::interrupt |
( |
| ) |
|
|
virtual |
◆ isInterrupted()#
| virtual 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 |
- Template Parameters
-
- Parameters
-
◆ operator<<()#
template<class Callable>
| void AAbstractThread::operator<< |
( |
Callable | fun | ) |
|
|
inline |
- Template Parameters
-
- Parameters
-
◆ resetInterruptFlag()#
| virtual void AAbstractThread::resetInterruptFlag |
( |
| ) |
|
|
virtual |