DelegateMQ
Loading...
Searching...
No Matches
dmq::IThread Class Referenceabstract

A base class for a delegate enabled execution thread. Implemented by application code if asynchronous delegates are used. More...

#include <IThread.h>

Inheritance diagram for dmq::IThread:
Thread Thread

Public Member Functions

virtual ~IThread ()=default
 Destructor.
 
virtual void DispatchDelegate (std::shared_ptr< DelegateMsg > msg)=0
 

Detailed Description

A base class for a delegate enabled execution thread. Implemented by application code if asynchronous delegates are used.

@TODO Implement the IThread interface if necessary.

Each platform specific implementation must inherit from IThread and provide an implementation for DispatchDelegate(). The DispatchDelegate() function is called by the source thread to initiate an asynchronous function call onto the destination thread of control.

Constructor & Destructor Documentation

◆ ~IThread()

virtual dmq::IThread::~IThread ( )
virtualdefault

Destructor.

Member Function Documentation

◆ DispatchDelegate()

virtual void dmq::IThread::DispatchDelegate ( std::shared_ptr< DelegateMsg > msg)
pure 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 IInvoker::Invoke() function must be called to execute the target function.

Parameters
[in]msgA shared pointer to the message.
Postcondition
The destination thread calls IThreadInvoker::Invoke() when DelegateMsg is received.

Implemented in Thread, and Thread.


The documentation for this class was generated from the following file: