From: Mikko Rasa Date: Mon, 23 May 2011 18:49:41 +0000 (+0300) Subject: Join threads upon object destruction X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=47a232c3c19e718a30281d3ada8acc1b6212ea8c Join threads upon object destruction --- diff --git a/source/core/thread.cpp b/source/core/thread.cpp index a0d2187..0fc86cf 100644 --- a/source/core/thread.cpp +++ b/source/core/thread.cpp @@ -54,7 +54,10 @@ void Thread::kill() Thread::~Thread() { if(launched_) + { kill(); + join(); + } } void Thread::launch()