From b8dd212347560a8c360e31135ef43669cb4ca3e5 Mon Sep 17 00:00:00 2001 From: mread Date: Tue, 1 Feb 2011 08:52:05 +0000 Subject: Idle detector thread improvements The idle detector thread was creating its own heap, which was rather unnnecesary as it doesn't actually allocate any objects. Now it shares the main thread's heap. It was also unnamed, which makes life harder when there is a crash. The debugger is given information about all threads in a crash. When a thread is unnamed, you can't easily tell if its relevant to the crash or not. Now it is called "IdleDetectorThread". Task-number: QTBUG-17073 Reviewed-by: axis --- src/corelib/kernel/qeventdispatcher_symbian.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 8872045..d6ab618a 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -657,7 +657,7 @@ public: : m_state(STATE_RUN), m_stop(false) { qt_symbian_throwIfError(m_lock.CreateLocal(0)); - TInt err = m_idleDetectorThread.Create(KNullDesC(), &idleDetectorThreadFunc, 1024, NULL, this); + TInt err = m_idleDetectorThread.Create(KNullDesC(), &idleDetectorThreadFunc, 1024, &User::Allocator(), this); if (err != KErrNone) m_lock.Close(); qt_symbian_throwIfError(err); @@ -692,6 +692,7 @@ public: private: static TInt idleDetectorThreadFunc(TAny* self) { + User::RenameThread(_L("IdleDetectorThread")); static_cast(self)->IdleLoop(); return KErrNone; } -- cgit v0.12