[Python-checkins] r50788 - python/branches/release24-maint/Python/thread_os2.h

andrew.macintyre python-checkins at python.org
Sun Jul 23 15:01:04 CEST 2006


Author: andrew.macintyre
Date: Sun Jul 23 15:01:03 2006
New Revision: 50788

Modified:
   python/branches/release24-maint/Python/thread_os2.h
Log:
bugfix: PyThread_start_new_thread() returns the thread ID, not a flag;
backport of rev 50787.


Modified: python/branches/release24-maint/Python/thread_os2.h
==============================================================================
--- python/branches/release24-maint/Python/thread_os2.h	(original)
+++ python/branches/release24-maint/Python/thread_os2.h	Sun Jul 23 15:01:03 2006
@@ -32,18 +32,15 @@
 long
 PyThread_start_new_thread(void (*func)(void *), void *arg)
 {
-	int aThread;
-	int success = 0;
+	int thread_id;
 
 	aThread = _beginthread(func, NULL, THREAD_STACK_SIZE, arg);
 
-	if (aThread == -1) {
-		success = -1;
-		fprintf(stderr, "aThread failed == %d", aThread);
+	if (thread_id == -1) {
 		dprintf(("_beginthread failed. return %ld\n", errno));
 	}
 
-	return success;
+	return thread_id;
 }
 
 long


More information about the Python-checkins mailing list