Go to the documentation of this file.
12 #ifndef RTCTK_COMPONENTFRAMEWORK_THREADACTIVITY_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_THREADACTIVITY_HPP
20 #include <scxml4cpp/Activity.h>
43 void start(scxml4cpp::Context* c)
override;
44 void stop(scxml4cpp::Context* c)
override;
52 std::future<void> m_thread_observer;
53 std::atomic<bool> m_is_stopped;
58 #endif // RTCTK_COMPONENTFRAMEWORK_THREADACTIVITY_HPP
Provides macros and utilities for exception handling.
Definition: commandReplier.cpp:20
ThreadActivity(std::string const &id, ActivityMethod activity, SuccessMethod on_success=nullptr, FailureMethod on_failure=nullptr)
Definition: threadActivity.cpp:17
ThreadActivity(const ThreadActivity &)=delete
std::function< void(StopToken)> ActivityMethod
Definition: threadActivity.hpp:29
rad::StopToken StopToken
Definition: stopToken.hpp:19
std::function< void()> SuccessMethod
Definition: threadActivity.hpp:30
ThreadActivity & operator=(const ThreadActivity &)=delete
std::function< void(std::exception_ptr)> FailureMethod
Definition: threadActivity.hpp:31
Class that handles state machine activities.
Definition: threadActivity.hpp:27
void start(scxml4cpp::Context *c) override
Definition: threadActivity.cpp:31
rad::StopSource StopSource
Definition: stopToken.hpp:18
void stop(scxml4cpp::Context *c) override
Definition: threadActivity.cpp:58
~ThreadActivity()
Definition: threadActivity.cpp:28