MADARA  3.1.8
RCWThread.cpp
Go to the documentation of this file.
1 #include "RCWThread.h"
2 
3 using namespace madara::threads;
4 using namespace madara::knowledge;
5 using namespace madara::knowledge::rcw;
6 
8 {
9  tx_.reset(new Transaction(kb));
10  setup(*tx_);
11 }
12 
13 void RCWThread::run (void)
14 {
15  tx_->pull();
16  compute(*tx_);
17  tx_->push();
18 }
19 
20 void RCWThread::cleanup (void)
21 {
22  finalize(*tx_);
23 }
Manages a Read-Compute-Write cycle for registered variables.
Definition: Transaction.h:43
Namespace holding Read-Compute-Write based abstractions for knowledge base access.
Definition: BaseTracker.h:29
Provides a quality-of-service-enabled threading library.
Definition: BaseThread.h:27
This class provides a distributed knowledge base to users.
Definition: KnowledgeBase.h:44
virtual void init(knowledge::KnowledgeBase &kb) overridefinal
Initializes thread with a MADARA context.
Definition: RCWThread.cpp:7
virtual void cleanup(void) overridefinal
Cleans up any thread residue (usually instances created in init).
Definition: RCWThread.cpp:20
Provides functions and classes for the distributed knowledge base.
virtual void run(void) overridefinal
Executes the main thread logic.
Definition: RCWThread.cpp:13