Mercurial > cpython-lru_cache-weakref
diff Python/thread_pth.h @ 30466:1a817694ecbd legacy-trunk
Patch #805613: Fix usage of the PTH library.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 20 Sep 2003 11:13:36 +0000 |
| parents | 8b116a8449bd |
| children | e38335d4df91 df5719c298db |
line wrap: on
line diff
--- a/Python/thread_pth.h Sat Sep 20 11:09:28 2003 +0000 +++ b/Python/thread_pth.h Sat Sep 20 11:13:36 2003 +0000 @@ -30,6 +30,8 @@ #define CHECK_STATUS(name) if (status == -1) { printf("%d ", status); perror(name); error = 1; } +pth_attr_t PyThread_attr; + /* * Initialization. */ @@ -37,6 +39,9 @@ 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 @@ if (!initialized) PyThread_init_thread(); - th = pth_spawn(PTH_ATTR_DEFAULT, + th = pth_spawn(PyThread_attr, (void* (*)(void *))func, (void *)arg );
