11#include <QWaitCondition>
16Q_DECLARE_METATYPE(std::shared_ptr<dmq::DelegateMsg>)
27 Thread(
const std::string& threadName);
57 std::string m_threadName;
58 QThread* m_thread =
nullptr;
59 Worker* m_worker =
nullptr;
73 auto invoker = msg->GetInvoker();
Interface for cross-thread delegate dispatching.
Cross-platform thread for any system supporting C++11 std::thread (e.g. Windows, Linux).
Definition cmsis-rtos2/Thread.h:33
static QThread * GetCurrentThreadId()
Get the current executing QThread pointer.
virtual void DispatchDelegate(std::shared_ptr< dmq::DelegateMsg > msg) override
Enqueues a delegate message for execution on this thread.
QThread * GetThreadId()
Get the QThread pointer (used as the ID)
bool CreateThread()
Create and start the internal QThread.
Thread(const std::string &threadName, size_t maxQueueSize=0)
Definition cmsis-rtos2/Thread.cpp:16
void ExitThread()
Stop the QThread.
void SignalDispatch(std::shared_ptr< dmq::DelegateMsg > msg)
std::string GetThreadName() const
Definition qt/Thread.h:44
Definition qt/Thread.h:67
void OnDispatch(std::shared_ptr< dmq::DelegateMsg > msg)
Definition qt/Thread.h:70
A base class for a delegate enabled execution thread. Implemented by application code if asynchronous...
Definition IThread.h:22