]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/thread.cpp
Join threads upon object destruction
[libs/core.git] / source / core / thread.cpp
index 6858ce9999b8ba2211db353802acfa2750811125..0fc86cf07c7cf18b23289438b9ecb84c5847dd2d 100644 (file)
@@ -1,8 +1,10 @@
-/*
-This file is part of libmspframework
+/* $Id$
+
+This file is part of libmspcore
 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
+
 #ifndef WIN32
 #include <signal.h>
 #endif
@@ -52,7 +54,10 @@ void Thread::kill()
 Thread::~Thread()
 {
        if(launched_)
+       {
                kill();
+               join();
+       }
 }
 
 void Thread::launch()