PIStringAsciixes

git-svn-id: svn://db.shs.com.ru/pip@101 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-04-15 13:30:53 +00:00
parent eb99c5752e
commit 85d90729fa
9 changed files with 153 additions and 110 deletions

View File

@@ -209,6 +209,7 @@ void * PIThread::thread_function(void * t) {
while (!ct.terminating) {
if (ct.lockRun) ct.mutex_.lock();
ct.run();
//printf("thread %p tick\n", &ct);
if (ct.ret_func != 0) ct.ret_func(ct.data_);
if (ct.lockRun) ct.mutex_.unlock();
if (ct.delay_ > 0) {
@@ -229,12 +230,12 @@ void * PIThread::thread_function(void * t) {
if (ct.lockRun) ct.mutex_.unlock();
ct.terminating = ct.running_ = false;
//cout << "thread " << t << " exiting ... " << endl;
ct.thread = 0;
#ifndef WINDOWS
pthread_exit(0);
#else
ExitThread(0);
#endif
ct.thread = 0;
return 0;
}
@@ -260,12 +261,12 @@ void * PIThread::thread_function_once(void * t) {
ct.end();
ct.terminating = ct.running_ = false;
//cout << "thread " << t << " exiting ... " << endl;
ct.thread = 0;
#ifndef WINDOWS
pthread_exit(0);
#else
ExitThread(0);
#endif
ct.thread = 0;
return 0;
}