20.10.2013 - Modified PIObject - virtual debugName() for macro piCoutObj, improved timer measurements and timers on Windows
This commit is contained in:
10
pithread.h
10
pithread.h
@@ -59,7 +59,11 @@ class PIP_EXPORT PIThread: public PIObject
|
||||
{
|
||||
PIOBJECT(PIThread)
|
||||
public:
|
||||
|
||||
//! Contructs thread with custom data "data", external function "func" and main cycle delay "timer_delay".
|
||||
PIThread(void * data, ThreadFunc func, bool startNow = false, int timer_delay = -1);
|
||||
|
||||
//! Contructs thread with main cycle delay "timer_delay".
|
||||
PIThread(bool startNow = false, int timer_delay = -1);
|
||||
virtual ~PIThread();
|
||||
|
||||
@@ -208,8 +212,14 @@ protected:
|
||||
static void * thread_function(void * t);
|
||||
static void * thread_function_once(void * t);
|
||||
|
||||
|
||||
//! Function executed once at the start of thread.
|
||||
virtual void begin() {;}
|
||||
|
||||
//! Function executed at every "timer_delay" msecs until thread was stopped.
|
||||
virtual void run() {;}
|
||||
|
||||
//! Function executed once at the end of thread.
|
||||
virtual void end() {;}
|
||||
|
||||
volatile bool terminating, running, lockRun;
|
||||
|
||||
Reference in New Issue
Block a user