BIG changes added
git-svn-id: svn://db.shs.com.ru/pip@128 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -125,6 +125,7 @@ bool PIThread::start(int timer_delay) {
|
||||
# ifndef ANDROID
|
||||
//pthread_attr_setschedparam(&attr, &sparam);
|
||||
# endif
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
int ret = pthread_create(&thread, &attr, thread_function, this);
|
||||
pthread_attr_destroy(&attr);
|
||||
if (ret == 0) {
|
||||
@@ -154,6 +155,7 @@ bool PIThread::startOnce() {
|
||||
# ifndef ANDROID
|
||||
//pthread_attr_setschedparam(&attr, &sparam);
|
||||
# endif
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
int ret = pthread_create(&thread, &attr, thread_function_once, this);
|
||||
pthread_attr_destroy(&attr);
|
||||
if (ret == 0) {
|
||||
@@ -184,7 +186,7 @@ void PIThread::terminate() {
|
||||
//pthread_kill(thread, SIGKILL);
|
||||
void * ret(0);
|
||||
pthread_cancel(thread);
|
||||
pthread_join(thread, &ret);
|
||||
//pthread_join(thread, &ret);
|
||||
# endif
|
||||
#else
|
||||
TerminateThread(thread, 0);
|
||||
|
||||
Reference in New Issue
Block a user