Mercurial > cpython-lru_cache-weakref
diff Python/thread_os2.h @ 39149:0a4ad83fd654 legacy-trunk
bugfix: PyThread_start_new_thread() returns the thread ID, not a flag;
will backport.
| author | Andrew MacIntyre <andymac@bullseye.apana.org.au> |
|---|---|
| date | Sun, 23 Jul 2006 13:00:04 +0000 |
| parents | f7d23bca599f |
| children | e38335d4df91 df5719c298db |
line wrap: on
line diff
--- a/Python/thread_os2.h Sun Jul 23 12:57:02 2006 +0000 +++ b/Python/thread_os2.h Sun Jul 23 13:00:04 2006 +0000 @@ -35,21 +35,18 @@ long PyThread_start_new_thread(void (*func)(void *), void *arg) { - int aThread; - int success = 0; + int thread_id; - aThread = _beginthread(func, + thread_id = _beginthread(func, NULL, OS2_STACKSIZE(_pythread_stacksize), 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
