+#ifdef WIN32
+ WaitForSingleObject(thread_, INFINITE);
+#else
+ pthread_join(thread_, 0);
+#endif
+ launched_=false;
+}
+
+/**
+Requests the thread to terminate gracefully. Currently unimplemented on win32.
+*/
+void Thread::cancel()
+{
+#ifndef WIN32 //XXX
+ pthread_cancel(thread_);
+#endif
+}
+
+/**
+Violently terminates the thread.
+*/
+void Thread::kill()
+{
+#ifdef WIN32
+ TerminateThread(thread_, 0);
+#else
+ pthread_kill(thread_, SIGKILL);
+#endif