X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fthread.cpp;h=6bc744422c55555bc11e8751618101db1d8a6d29;hp=384657397337813102aef1f8fe74dec9405bc2c0;hb=64f0b85e4d5b0cbf1dc76eb3a5342403247576fe;hpb=1013e3c216cdf8e0ecc0f3b1e8314989b5333818 diff --git a/source/thread.cpp b/source/thread.cpp index 3846573..6bc7444 100644 --- a/source/thread.cpp +++ b/source/thread.cpp @@ -10,18 +10,18 @@ namespace Msp { void *Thread::join() { - if(!thread_) + if(!valid_) return 0; void *result; pthread_join(thread_, &result); - thread_=0; + valid_=false; return result; } Thread::~Thread() { - if(thread_) + if(valid) kill(SIGKILL); }