src/thread_pthread.cpp
branchNewGRF_ports
changeset 10994 cd9968b6f96b
parent 10991 d8811e327d12
--- a/src/thread_pthread.cpp	Tue Jun 17 10:32:49 2008 +0000
+++ b/src/thread_pthread.cpp	Tue Jun 17 13:22:13 2008 +0000
@@ -102,8 +102,6 @@
 
 		pthread_join(m_thr, NULL);
 		m_thr = 0;
-
-		delete this;
 	}
 
 	/* virtual */ bool IsCurrent()
@@ -136,20 +134,14 @@
 		/* The new thread stops here so the calling thread can complete pthread_create() call */
 		sem_wait(&m_sem_start);
 
-		/* Did this thread die naturally/via exit, or did it join? */
-		bool exit = false;
-
 		/* Call the proc of the creator to continue this thread */
 		try {
 			m_proc(m_param);
 		} catch (...) {
-			exit = true;
 		}
 
 		/* Notify threads waiting for our completion */
 		sem_post(&m_sem_stop);
-
-		if (exit) delete this;
 	}
 };