FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bugfix: PyThread_start_new_thread() returns the thread ID, not a flag; · python-emscripten/cpython@82247cb · GitHub

Repository navigation

Commit 82247cb

Browse files
Andrew MacIntyre
committed
bugfix: PyThread_start_new_thread() returns the thread ID, not a flag;
will backport.
1 parent bb45037 commit 82247cb

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎Python/thread_os2.h‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,18 @@ PyThread__init_thread(void)
3535
long
3636
PyThread_start_new_thread(void (*func)(void *), void *arg)
3737
{
38-
int aThread;
39-
int success = 0;
38+
int thread_id;
4039

41-
aThread = _beginthread(func,
40+
thread_id = _beginthread(func,
4241
NULL,
4342
OS2_STACKSIZE(_pythread_stacksize),
4443
arg);
4544

46-
if (aThread == -1) {
47-
success = -1;
48-
fprintf(stderr, "aThread failed == %d", aThread);
45+
if (thread_id == -1) {
4946
dprintf(("_beginthread failed. return %ld\n", errno));
5047
}
5148

52-
return success;
49+
return thread_id;
5350
}
5451

5552
long

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL