MADARA
3.1.8
|
Abstract base class for implementing base threads. More...
#include <WorkUnit.h>
Public Member Functions | |
WorkUnit () | |
Default constructor. More... | |
virtual void | cleanup (void) |
Cleans up any thread residue (usually instances created in init). More... | |
virtual void | init (knowledge::Variables &vars) |
Initializes thread with MADARA context. More... | |
virtual void | run (void)=0 |
Executes the main thread logic. More... | |
Private Attributes | |
bool | critical |
Criticality. More... | |
int | priority |
Task priority. More... | |
Abstract base class for implementing base threads.
Definition at line 30 of file WorkUnit.h.
|
inline |
Default constructor.
Definition at line 36 of file WorkUnit.h.
|
inlinevirtual |
Cleans up any thread residue (usually instances created in init).
It's important to note that the only things that would need to be cleaned up are generally ports opened, memory initialized with new/malloc, etc. Anything MADARA related is generally cleaned up for you.
Definition at line 63 of file WorkUnit.h.
|
inlinevirtual |
Initializes thread with MADARA context.
vars | context for querying current program state |
Definition at line 46 of file WorkUnit.h.
|
pure virtual |
Executes the main thread logic.
|
private |
Criticality.
If true, this thread's execution must complete
Definition at line 78 of file WorkUnit.h.
|
private |
Task priority.
Definition at line 73 of file WorkUnit.h.