1#ifndef _DRAMA2_THREADDISPATCH_INC
2#define _DRAMA2_THREADDISPATCH_INC
39 class ThreadDispatcher {
44 std::string _threadName;
45 std::string _messageName;
46 std::future<void> _future;
47 bool _running =
false;
49 std::string _targetTaskName;
74 virtual std::string MessageTypeName()
const = 0;
186 virtual std::string MessageTypeName()
const override;
Implement a ThreadDispatcher which sends Obey messages.
Definition threaddispatch.hh:190
A Class which provides access to DRAMA's message sending facilities.
Definition path.hh:689
A class which implements a DRAMA task.
Definition task.hh:441
virtual ~ThreadDispatcher()
Destructor.
Definition threaddispatch.hh:123
bool CheckResult(StatusType *status)
Check the result of the thread.
bool IsRunning()
Returns true if the thread is running.
Definition threaddispatch.hh:135
void Send(drama::thread::TMessHandler *messHandler, drama::Path *path, sds::IdPtr arg=nullptr)
Send a message using a new thread.
ThreadDispatcher(drama::Task *theTask, const std::string &threadName, const std::string &messageName)
Construct a thread dispatcher.
Definition threaddispatch.hh:112
A class to dispatch message sending to another thread.
Definition threaddispatch.hh:66
This interface class must be implemented by classes which have threads waiting for messages.
Definition thread.hh:308
DRAMA 2 main include file.
std::shared_ptr< Id > IdPtr
A shared pointer for sds::Id items.
Definition sds.hh:3318
void CreateRunDramaTask()
Create and run a DRAMA task, with standard exception handling.
Definition task.hh:1322
The drama namespace contains all the classes, types etc of the DRAMA 2 implementation.
Definition drama.hh:93