]> git.tdb.fi Git - libs/core.git/commitdiff
Join threads upon object destruction
authorMikko Rasa <tdb@tdb.fi>
Mon, 23 May 2011 18:49:41 +0000 (21:49 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 24 May 2011 06:02:35 +0000 (09:02 +0300)
source/core/thread.cpp

index a0d21875241e584614da7ed01aef0dd4ae4ae325..0fc86cf07c7cf18b23289438b9ecb84c5847dd2d 100644 (file)
@@ -54,7 +54,10 @@ void Thread::kill()
 Thread::~Thread()
 {
        if(launched_)
+       {
                kill();
+               join();
+       }
 }
 
 void Thread::launch()