summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Oleynik <aoleynik@luxoft.com>2016-06-01 15:45:45 +0300
committerAndrey Oleynik <aoleynik@luxoft.com>2016-06-01 15:52:58 +0300
commit8d3adfd0a8747ea4059053c1c953526305cdac21 (patch)
treeb6129bb6a1eb68ba4bb3050a8d81907fe0e365a0
parent3d9610245c1d4bcbcb10509719667445c4e93f97 (diff)
downloadsdl_core-8d3adfd0a8747ea4059053c1c953526305cdac21.tar.gz
Fixes setting of QT thread handle, drops odd interface
Related-issues: APPLINK-22713, APPLINK-22716
-rw-r--r--src/components/include/utils/threads/thread.h10
-rw-r--r--src/components/utils/src/threads/thread_qt.cc6
2 files changed, 4 insertions, 12 deletions
diff --git a/src/components/include/utils/threads/thread.h b/src/components/include/utils/threads/thread.h
index c8ceefb1cf..34d56e0f55 100644
--- a/src/components/include/utils/threads/thread.h
+++ b/src/components/include/utils/threads/thread.h
@@ -216,16 +216,6 @@ class Thread {
return handle_;
}
-#if defined(QT_PORT)
- /**
- * @brief Sets handle of thread which has delegate running
- * @param handle Thread handle
- */
- void set_thread_handle(PlatformThreadHandle handle) {
- handle_ = handle;
- }
-#endif
-
/**
* @brief Checks if invoked in this Thread context
* @return True if called from this Thread class, false otherwise
diff --git a/src/components/utils/src/threads/thread_qt.cc b/src/components/utils/src/threads/thread_qt.cc
index 5b4360d250..93da93987e 100644
--- a/src/components/utils/src/threads/thread_qt.cc
+++ b/src/components/utils/src/threads/thread_qt.cc
@@ -61,10 +61,12 @@ void* Thread::threadFunc(void* arg) {
threads::Thread* thread = static_cast<Thread*>(arg);
DCHECK(thread);
- // Sets thread id in order to be able to check that id on thread joining
- thread->set_thread_handle(QThread::currentThread);
thread->state_lock_.Acquire();
+
+ // Sets thread id in order to be able to check that id on thread joining
+ thread->handle_ = QThread::currentThread();
+
thread->state_cond_.Broadcast();
while (!thread->finalized_) {