diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-09-20 11:13:36 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-09-20 11:13:36 (GMT) |
commit | 70849f84a04e19f8723cfbea24dd3c8be301bf06 (patch) | |
tree | 81aba78fd64d26bcb18e4d2dbdeb00727fccee1c /Python/thread_pth.h | |
parent | 7bdc484c97eb418dcffcdc7a4390e30818d277cb (diff) | |
download | cpython-70849f84a04e19f8723cfbea24dd3c8be301bf06.zip cpython-70849f84a04e19f8723cfbea24dd3c8be301bf06.tar.gz cpython-70849f84a04e19f8723cfbea24dd3c8be301bf06.tar.bz2 |
Patch #805613: Fix usage of the PTH library.
Diffstat (limited to 'Python/thread_pth.h')
-rw-r--r-- | Python/thread_pth.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Python/thread_pth.h b/Python/thread_pth.h index 3b97981..8c7dbe9 100644 --- a/Python/thread_pth.h +++ b/Python/thread_pth.h @@ -30,6 +30,8 @@ typedef struct { #define CHECK_STATUS(name) if (status == -1) { printf("%d ", status); perror(name); error = 1; } +pth_attr_t PyThread_attr; + /* * Initialization. */ @@ -37,6 +39,9 @@ typedef struct { static void PyThread__init_thread(void) { pth_init(); + PyThread_attr = pth_attr_new(); + pth_attr_set(PyThread_attr, PTH_ATTR_STACK_SIZE, 1<<18); + pth_attr_set(PyThread_attr, PTH_ATTR_JOINABLE, FALSE); } /* @@ -51,7 +56,7 @@ long PyThread_start_new_thread(void (*func)(void *), void *arg) if (!initialized) PyThread_init_thread(); - th = pth_spawn(PTH_ATTR_DEFAULT, + th = pth_spawn(PyThread_attr, (void* (*)(void *))func, (void *)arg ); |