diff Python/thread_pthread.h @ 5395:2c81d7d68ed3 legacy-trunk

Add detach call so threads are GC'ed.
author Guido van Rossum <guido@python.org>
date Wed, 30 Apr 1997 19:59:22 +0000
parents 9bc652e9f2b4
children ef93d51dab36
line wrap: on
line diff
--- a/Python/thread_pthread.h	Wed Apr 30 19:48:59 1997 +0000
+++ b/Python/thread_pthread.h	Wed Apr 30 19:59:22 1997 +0000
@@ -98,6 +98,8 @@
 		init_thread();
 	success = pthread_create(&th, pthread_attr_default,
 				 (void* (*) _P((void *)))func, arg);
+	if (success >= 0)
+		pthread_detach(th);
 	return success < 0 ? 0 : 1;
 }