12#include <condition_variable>
21 Thread(
const std::string& threadName);
54 void SetThreadName(std::thread::native_handle_type handle,
const std::string& name);
56 std::unique_ptr<std::thread> m_thread;
57 std::queue<std::shared_ptr<ThreadMsg>> m_queue;
59 std::condition_variable m_cv;
60 const std::string THREAD_NAME;
63 std::promise<void> m_threadStartPromise;
64 std::future<void> m_threadStartFuture;
66 std::atomic<bool> m_exit;
A base class for a delegate enabled execution thread. Implemented by application code if asynchronous...
Definition freertos/Thread.h:19
std::string GetThreadName()
Get thread name.
Definition stdlib/Thread.h:40
Thread(const std::string &threadName)
Constructor.
virtual void DispatchDelegate(std::shared_ptr< dmq::DelegateMsg > msg)
std::thread::id GetThreadId()
Get the ID of this thread instance.
static std::thread::id GetCurrentThreadId()
Get the ID of the currently executing thread.
size_t GetQueueSize()
Get size of thread message queue.
Definition stdlib/Thread.cpp:72
void ExitThread()
Called once a program exit to exit the worker thread.
Definition stdlib/Thread.cpp:97
A class to hold a platform-specific thread messsage that will be passed through the OS message queue.
Definition freertos/ThreadMsg.h:7