From 47a232c3c19e718a30281d3ada8acc1b6212ea8c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 23 May 2011 21:49:41 +0300 Subject: [PATCH] Join threads upon object destruction --- source/core/thread.cpp | 3 +++ 1 file changed, 3 insertions(+) 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() -- 2.45.2