Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bea474

Browse files
author
Andrew MacIntyre
committed
make thread stack size compile-time tunable on OS/2
1 parent 0588581 commit 2bea474

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Python/thread_os2.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
long PyThread_get_thread_ident(void);
1515
#endif
1616

17+
#if !defined(THREAD_STACK_SIZE)
18+
#define THREAD_STACK_SIZE 0x10000
19+
#endif
20+
1721
/*
1822
* Initialization of the C package, should not be needed.
1923
*/
@@ -31,7 +35,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
3135
int aThread;
3236
int success = 0;
3337

34-
aThread = _beginthread(func,NULL,65536,arg);
38+
aThread = _beginthread(func, NULL, THREAD_STACK_SIZE, arg);
3539

3640
if (aThread == -1) {
3741
success = -1;

0 commit comments

Comments
 (0)