3 #ifndef _MADARA_THREADS_BASE_THREAD_H_
4 #define _MADARA_THREADS_BASE_THREAD_H_
21 #include "madara/MadaraExport.h"
62 virtual void run(
void) = 0;
This class provides a distributed knowledge base to users.
This class stores an integer within a variable context.
void set_name(const std::string &var_name, KnowledgeBase &knowledge)
Sets the variable name that this refers to.
Abstract base class for implementing threads.
std::string name
The unique name of your thread.
virtual void run(void)=0
Executes the main thread logic.
virtual void cleanup(void)
Cleans up any thread residue (usually instances created in init).
virtual void init_control_vars(knowledge::KnowledgeBase &control)
Initializes the thread implementation's control plane variables.
madara::knowledge::containers::Integer terminated
thread safe terminated flag that may be set by the Threader base
virtual void init(knowledge::KnowledgeBase &)
Initializes thread with a MADARA context.
madara::knowledge::containers::Integer paused
thread safe paused flag that may be set by the Threader
virtual ~BaseThread()
Destructor.
Starts threads with first class support of MADARA contexts.
A thread that executes BaseThread logic.
Provides a quality-of-service-enabled threading library.
Copyright(c) 2020 Galois.