src/thread_pthread.cpp
branchnoai
changeset 10613 c1570be72d6c
parent 10455 22c441f5adf9
child 10867 5de2923d6e59
--- a/src/thread_pthread.cpp	Sun May 11 20:23:26 2008 +0000
+++ b/src/thread_pthread.cpp	Sun May 18 11:25:04 2008 +0000
@@ -104,8 +104,6 @@
 		pthread_join(m_thr, &ret);
 		m_thr = 0;
 
-		delete this;
-
 		return ret;
 	}
 
@@ -138,21 +136,15 @@
 		/* 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;
-
 		pthread_exit(NULL);
 	}
 };