summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2006-06-04 12:31:09 (GMT)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2006-06-04 12:31:09 (GMT)
commit6539d2d3c758b507f10779e218d52d6c9f355025 (patch)
treed3677cd901f44e2341a50be45d8a3d2f6d1f4da6 /Doc
parent7a071939d96702e13c377a5e7f87df7bf20391e5 (diff)
downloadcpython-6539d2d3c758b507f10779e218d52d6c9f355025.zip
cpython-6539d2d3c758b507f10779e218d52d6c9f355025.tar.gz
cpython-6539d2d3c758b507f10779e218d52d6c9f355025.tar.bz2
Patch #1454481: Make thread stack size runtime tunable.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libthread.tex19
-rw-r--r--Doc/lib/libthreading.tex19
2 files changed, 38 insertions, 0 deletions
diff --git a/Doc/lib/libthread.tex b/Doc/lib/libthread.tex
index 9573ab3..4a2d872 100644
--- a/Doc/lib/libthread.tex
+++ b/Doc/lib/libthread.tex
@@ -74,6 +74,25 @@ data. Thread identifiers may be recycled when a thread exits and
another thread is created.
\end{funcdesc}
+\begin{funcdesc}{stack_size}{\optional{size}}
+Return the thread stack size used when creating new threads. The
+optional \var{size} argument specifies the stack size to be used for
+subsequently created threads, and must be 0 (use platform or
+configured default) or a positive integer value of at least 32,768 (32kB).
+If changing the thread stack size is unsupported, or the specified size
+is invalid, a RuntimeWarning is issued and the stack size is unmodified.
+32kB is currently the minimum supported stack size value, to guarantee
+sufficient stack space for the interpreter itself.
+Note that some platforms may have particular restrictions on values for
+the stack size, such as requiring allocation in multiples of the system
+memory page size - platform documentation should be referred to for more
+information (4kB pages are common; using multiples of 4096 for the
+stack size is the suggested approach in the absence of more specific
+information).
+Availability: Windows, systems with \POSIX{} threads.
+\versionadded{2.5}
+\end{funcdesc}
+
Lock objects have the following methods:
diff --git a/Doc/lib/libthreading.tex b/Doc/lib/libthreading.tex
index 8fb3137..86330a7 100644
--- a/Doc/lib/libthreading.tex
+++ b/Doc/lib/libthreading.tex
@@ -125,6 +125,25 @@ method is called.
\versionadded{2.3}
\end{funcdesc}
+\begin{funcdesc}{stack_size}{\optional{size}}
+Return the thread stack size used when creating new threads. The
+optional \var{size} argument specifies the stack size to be used for
+subsequently created threads, and must be 0 (use platform or
+configured default) or a positive integer value of at least 32,768 (32kB).
+If changing the thread stack size is unsupported, or the specified size
+is invalid, a RuntimeWarning is issued and the stack size is unmodified.
+32kB is currently the minimum supported stack size value, to guarantee
+sufficient stack space for the interpreter itself.
+Note that some platforms may have particular restrictions on values for
+the stack size, such as requiring allocation in multiples of the system
+memory page size - platform documentation should be referred to for more
+information (4kB pages are common; using multiples of 4096 for the
+stack size is the suggested approach in the absence of more specific
+information).
+Availability: Windows, systems with \POSIX{} threads.
+\versionadded{2.5}
+\end{funcdesc}
+
Detailed interfaces for the objects are documented below.
The design of this module is loosely based on Java's threading model.