![]() |
DSPatch
v.2.42
C++ Cross-Platform, Object-Oriented, Flow-Based Programming Library
|
Cross-platform, object-oriented thread. More...
#include <DspThreadNull.h>
Public Types | |
enum | Priority { IdlePriority, LowestPriority, LowPriority, NormalPriority, HighPriority, HighestPriority, TimeCriticalPriority } |
Public Member Functions | |
virtual void | Start (Priority priority) |
virtual void | Stop () |
Static Public Member Functions | |
static void | SetPriority (Priority priority) |
static void | MsSleep (unsigned short milliseconds) |
Cross-platform, object-oriented thread.
An class that is required to run actions in a parallel thread can be derived from DspThread in order to inherit multi-threading abilities. The Start() method initiates a parallel thread and executes the private virtual _Run() method in that thread. The derived class must override this _Run() method with one that executes the required parallel actions. Other threads may use the static MsSleep() and SetPriority() methods without having to derive from, or create an instance of DspThread. Priority for the created thread, or calling threads (via SetPriority()), may be selected from the public enumeration: Priority.
Definition at line 41 of file DspThreadNull.h.