git-svn-id: svn://db.shs.com.ru/pip@701 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -187,8 +187,11 @@ PIThread::PIThread(bool startNow, int timer_delay): PIObject() {
|
||||
PIThread::~PIThread() {
|
||||
piMonitor.threads--;
|
||||
if (!running_ || PRIVATE->thread == 0) return;
|
||||
#ifdef FREERTOS
|
||||
piCout << "FREERTOS can't terminate pthreads!";
|
||||
#endif
|
||||
#ifndef WINDOWS
|
||||
# if defined(ANDROID) || defined(FREERTOS)
|
||||
# ifdef ANDROID
|
||||
pthread_kill(PRIVATE->thread, SIGTERM);
|
||||
# else
|
||||
pthread_cancel(PRIVATE->thread);
|
||||
@@ -287,9 +290,12 @@ void PIThread::terminate() {
|
||||
PIINTROSPECTION_UNREGISTER_THREAD(tid());
|
||||
terminating = running_ = false;
|
||||
tid_ = -1;
|
||||
#ifdef FREERTOS
|
||||
piCout << "FREERTOS can't terminate pthreads!";
|
||||
#endif
|
||||
//piCout << "terminate" << PRIVATE->thread;
|
||||
#ifndef WINDOWS
|
||||
# if defined(ANDROID) || defined(FREERTOS)
|
||||
# ifdef ANDROID
|
||||
pthread_kill(PRIVATE->thread, SIGTERM);
|
||||
# else
|
||||
//pthread_kill(PRIVATE->thread, SIGKILL);
|
||||
|
||||
Reference in New Issue
Block a user