17.10.2013 - Adjusted for QNX, PIPeer release for Windows, Remote console
This commit is contained in:
@@ -63,6 +63,7 @@ void piUSleep(int usecs) {
|
||||
|
||||
PIThread::PIThread(void * data, ThreadFunc func, bool startNow, int timer_delay): PIObject() {
|
||||
piMonitor.threads++;
|
||||
thread = 0;
|
||||
data_ = data;
|
||||
ret_func = func;
|
||||
running = lockRun = false;
|
||||
@@ -74,6 +75,7 @@ PIThread::PIThread(void * data, ThreadFunc func, bool startNow, int timer_delay)
|
||||
|
||||
PIThread::PIThread(bool startNow, int timer_delay): PIObject() {
|
||||
piMonitor.threads++;
|
||||
thread = 0;
|
||||
ret_func = 0;
|
||||
running = lockRun = false;
|
||||
priority_ = piNormal;
|
||||
@@ -84,7 +86,7 @@ PIThread::PIThread(bool startNow, int timer_delay): PIObject() {
|
||||
|
||||
PIThread::~PIThread() {
|
||||
piMonitor.threads--;
|
||||
if (!running) return;
|
||||
if (!running || thread == 0) return;
|
||||
#ifndef WINDOWS
|
||||
pthread_cancel(thread);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user