diff options
author | drochner <drochner@pkgsrc.org> | 2002-09-06 17:01:08 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2002-09-06 17:01:08 +0000 |
commit | 91070a1ea31f627d4e4d5bf70ee5f5d1509b305b (patch) | |
tree | 977b106372feff988cd7ef85d1d30535ad1aa07c /lang/python21-pth | |
parent | b09fe4bbe5be6460d778b9abbed35787c18e2815 (diff) | |
download | pkgsrc-91070a1ea31f627d4e4d5bf70ee5f5d1509b305b.tar.gz |
more pth hackery:
increase stack size for created threads, and set the JOINABLE attribute
to "false" (nothing will join() them) to avoid a ressource leak
"works better now"
Diffstat (limited to 'lang/python21-pth')
-rw-r--r-- | lang/python21-pth/distinfo | 3 | ||||
-rw-r--r-- | lang/python21-pth/patches/patch-ba | 32 |
2 files changed, 34 insertions, 1 deletions
diff --git a/lang/python21-pth/distinfo b/lang/python21-pth/distinfo index 808581e3788..db567908ffa 100644 --- a/lang/python21-pth/distinfo +++ b/lang/python21-pth/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2002/09/04 14:25:17 drochner Exp $ +$NetBSD: distinfo,v 1.3 2002/09/06 17:01:09 drochner Exp $ SHA1 (Python-2.1.3.tgz) = 7042a5c5fd60d334c0ac227885d68a4c305713b4 Size (Python-2.1.3.tgz) = 6194432 bytes @@ -9,3 +9,4 @@ SHA1 (patch-ad) = 769bcd7803723c8d538a74173792ffcc491fa414 SHA1 (patch-ae) = 079cd208ba57755a7e0f3ac03b6ba59d622be5db SHA1 (patch-af) = 2caa6dd54088b1866679338df2c1311c4718cf0f SHA1 (patch-ag) = fa9a5f13072d9137182675394f04cd9b163d3a5c +SHA1 (patch-ba) = 5e47b2e75ea40682216e42fbf8b971432836afdc diff --git a/lang/python21-pth/patches/patch-ba b/lang/python21-pth/patches/patch-ba new file mode 100644 index 00000000000..a5e7941b3a5 --- /dev/null +++ b/lang/python21-pth/patches/patch-ba @@ -0,0 +1,32 @@ +$NetBSD: patch-ba,v 1.1 2002/09/06 17:01:08 drochner Exp $ + +--- Python/thread_pth.h.orig Thu Oct 12 22:58:32 2000 ++++ Python/thread_pth.h Fri Sep 6 18:34:12 2002 +@@ -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 + ); |