Represents a user-defined thread.
#include <AUI/Thread/AThread.h>
> All members, including inherited
◆ current()
◆ interrupt()
void AThread::interrupt |
( |
| ) |
|
|
overridevirtual |
◆ interruptionPoint()
static void AThread::interruptionPoint |
( |
| ) |
|
|
static |
If the interruption flag is raised for the caller thread then flag is reset and AThread::Interrupted exception is thrown, efficiently stopping the task execution and safely freeing resources with C++'s RAII feature.
async, asyncX, AThreadPool::enqueue, AUI_ENTRY handle AThread::Interrupted, so throwing AThread::Interrupted is safe.
◆ isInterrupted()
bool AThread::isInterrupted |
( |
| ) |
|
|
overridevirtual |
- Returns
- true if interrupt requested for this thread.
Reimplemented from AAbstractThread.
◆ resetInterruptFlag()
void AThread::resetInterruptFlag |
( |
| ) |
|
|
overridevirtual |
◆ setName()
static void AThread::setName |
( |
AString | name | ) |
|
|
inlinestaticnoexcept |
Sets name of the current thread for debugger.
- Parameters
-
name | new name of the thread |
◆ sleep()
static void AThread::sleep |
( |
std::chrono::milliseconds | duration | ) |
|
|
static |