rev 517 - trunk/src

SVN User <[email protected]> Thu, 20 May 2004 13:28:09 -0400
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: bcollins
Date: 2004-05-20 13:28:06 -0400 (Thu, 20 May 2004)
New Revision: 517

Modified:
   trunk/src/builtins-thread.c
Log:
Prevent race in new_thread_obj().


Modified: trunk/src/builtins-thread.c
===================================================================
--- trunk/src/builtins-thread.c	2004-05-20 17:13:16 UTC (rev 516)
+++ trunk/src/builtins-thread.c	2004-05-20 17:28:06 UTC (rev 517)
@@ -140,10 +140,11 @@
 	}
 	thread_p->ist = new_ist(acc_level);
 
+	new_thread_object = thread_obj;
+
 	aprerr = apr_thread_create(&new_thread, thread_attr, thread_func, thread_data, thread_pool);
 	IF_APR_ERR("apr_thread_create") return NULL;
 
-	new_thread_object = thread_obj;
 	return thread_obj;
 }