diff options
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index b0b285e..5401cfd 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -208,6 +208,7 @@ void QThreadPrivate::createEventDispatcher(QThreadData *data) void *QThreadPrivate::start(void *arg) { + // Symbian Open C supports neither thread cancellation nor cleanup_push. #ifndef Q_OS_SYMBIAN pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); pthread_cleanup_push(QThreadPrivate::finish, arg); @@ -584,6 +585,11 @@ void QThread::terminate() } d->terminated = true; + // "false, false" meaning: + // 1. lockAnyway = false. Don't lock the mutex because it's already locked + // (see above). + // 2. closeNativeSymbianHandle = false. We don't want to close the thread handle, + // because we need it here to terminate the thread. QThreadPrivate::finish(this, false, false); d->data->symbian_thread_handle.Terminate(KErrNone); d->data->symbian_thread_handle.Close(); @@ -627,6 +633,9 @@ void QThread::setTerminationEnabled(bool enabled) d->terminationEnabled = enabled; if (enabled && d->terminatePending) { d->terminated = true; + // "false" meaning: + // - lockAnyway = false. Don't lock the mutex because it's already locked + // (see above). QThreadPrivate::finish(thr, false); locker.unlock(); // don't leave the mutex locked! pthread_exit(NULL); |