#include <Thread.h>
◆ Thread() [1/2]
Thread::Thread |
( |
const std::string & | threadName | ) |
|
◆ ~Thread() [1/2]
◆ Thread() [2/2]
Thread::Thread |
( |
const std::string & | threadName | ) |
|
◆ ~Thread() [2/2]
◆ CreateThread() [1/2]
bool Thread::CreateThread |
( |
| ) |
|
Called once to create the worker thread
- Returns
- TRUE if thread is created. FALSE otherise.
◆ CreateThread() [2/2]
bool Thread::CreateThread |
( |
| ) |
|
Called once to create the worker thread
- Returns
- TRUE if thread is created. FALSE otherise.
◆ DispatchDelegate() [1/2]
virtual void Thread::DispatchDelegate |
( |
std::shared_ptr< dmq::DelegateMsg > | msg | ) |
|
|
virtual |
Dispatch a DelegateMsg
onto this thread. The implementer is responsible for getting the DelegateMsg
into an OS message queue. Once DelegateMsg
is on the destination thread of control, the IDelegateInvoker::Invoke()
function must be called to execute the target function.
- Parameters
-
[in] | msg | A shared pointer to the message. |
- Postcondition
- The destination thread calls
IThreadInvoker::Invoke()
when DelegateMsg
is received.
Implements dmq::IThread.
◆ DispatchDelegate() [2/2]
Dispatch a DelegateMsg
onto this thread. The implementer is responsible for getting the DelegateMsg
into an OS message queue. Once DelegateMsg
is on the destination thread of control, the IDelegateInvoker::Invoke()
function must be called to execute the target function.
- Parameters
-
[in] | msg | A shared pointer to the message. |
- Postcondition
- The destination thread calls
IThreadInvoker::Invoke()
when DelegateMsg
is received.
Implements dmq::IThread.
◆ ExitThread()
void Thread::ExitThread |
( |
| ) |
|
Called once a program exit to exit the worker thread.
◆ GetCurrentThreadId() [1/2]
std::thread::id Thread::GetCurrentThreadId |
( |
| ) |
|
|
static |
Get the ID of the currently executing thread.
◆ GetCurrentThreadId() [2/2]
static std::thread::id Thread::GetCurrentThreadId |
( |
| ) |
|
|
static |
Get the ID of the currently executing thread.
◆ GetQueueSize()
size_t Thread::GetQueueSize |
( |
| ) |
|
Get size of thread message queue.
◆ GetThreadId() [1/2]
std::thread::id Thread::GetThreadId |
( |
| ) |
|
Get the ID of this thread instance.
◆ GetThreadId() [2/2]
std::thread::id Thread::GetThreadId |
( |
| ) |
|
Get the ID of this thread instance.
◆ GetThreadName() [1/2]
std::string Thread::GetThreadName |
( |
| ) |
|
|
inline |
◆ GetThreadName() [2/2]
std::string Thread::GetThreadName |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files: