[Marble-commits] KDE/kdeedu/marble/src/plugins/positionprovider/gpsd

Dennis Nienhüser earthwings at gentoo.org
Fri Jan 1 18:39:21 CET 2010


SVN commit 1068626 by nienhueser:

If the thread does not stop voluntarily within five seconds, kill it.
BUG: 220236


 M  +8 -1      GpsdPositionProviderPlugin.cpp  


--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.cpp #1068625:1068626
@@ -11,9 +11,9 @@
 #include "GpsdPositionProviderPlugin.h"
 
 #include "GpsdThread.h"
+#include "MarbleDebug.h"
 
 
-
 using namespace Marble;
 
 QString GpsdPositionProviderPlugin::name() const
@@ -104,6 +104,13 @@
 {
     if (m_thread) {
         m_thread->exit();
+        
+        if (!m_thread->wait( 5000 ) )
+        {
+          mDebug() << "Failed to stop GpsdThread, terminating it.";
+          m_thread->terminate();
+        }
+
         m_thread->wait();
         delete m_thread;
     }


More information about the Marble-commits mailing list