Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
+
#ifndef WIN32
#include <signal.h>
#endif
#else
pthread_join(thread_, 0);
#endif
- launched_=false;
+ launched_ = false;
}
/**
Thread::~Thread()
{
if(launched_)
+ {
kill();
+ join();
+ }
}
void Thread::launch()
#ifdef WIN32
DWORD dummy; // Win9x needs the lpTthreadId parameter
- thread_=CreateThread(0, 0, &main_, this, 0, &dummy);
+ thread_ = CreateThread(0, 0, &main_, this, 0, &dummy);
#else
pthread_create(&thread_, 0, &main_, this);
#endif
- launched_=true;
+ launched_ = true;
}
} // namespace Msp