+/*
+This file is part of libmspframework
+Copyright © 2006 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+#include <signal.h>
+#include "thread.h"
+
+namespace Msp {
+
+void *Thread::join()
+{
+ if(!thread_)
+ return 0;
+
+ void *result;
+ pthread_join(thread_, &result);
+ thread_=0;
+ return result;
+}
+
+Thread::~Thread()
+{
+ if(thread_)
+ kill(SIGKILL);
+}
+
+} // namespace Msp