DelegateMQ
Loading...
Searching...
No Matches
Thread.h File Reference

ThreadX implementation of the DelegateMQ IThread interface. More...

#include "delegate/IThread.h"
#include "tx_api.h"
#include <string>
#include <memory>
#include <vector>

Go to the source code of this file.

Classes

class  Thread
 Cross-platform thread for any system supporting C++11 std::thread (e.g. Windows, Linux). More...
 

Detailed Description

ThreadX implementation of the DelegateMQ IThread interface.

See also
https://github.com/endurodave/DelegateMQ David Lafreniere, 2026.

This class provides a concrete implementation of the IThread interface using Azure RTOS ThreadX primitives. It enables DelegateMQ to dispatch asynchronous delegates to a dedicated ThreadX thread.

Key Features:

  • Task Integration: Wraps tx_thread_create to establish a dedicated worker loop.
  • Queue-Based Dispatch: Uses a TX_QUEUE to receive and process incoming delegate messages in a thread-safe manner.
  • Priority Control: Supports runtime priority configuration via SetThreadPriority.
  • Dynamic Configuration: Allows configuring stack size and queue depth at construction.
  • Graceful Shutdown: Implements robust termination logic using semaphores to ensure the thread exits cleanly before destruction.