summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libthreading.tex
diff options
context:
space:
mode:
authorJim Fulton <jim@zope.com>2004-07-14 19:11:50 (GMT)
committerJim Fulton <jim@zope.com>2004-07-14 19:11:50 (GMT)
commitd15dc06df062fdf0fe8badec2982c6c5e0e28eb0 (patch)
treee0295c2c22fa7c2e702b37a1d7afd77547a8894f /Doc/lib/libthreading.tex
parente827437f45510d9cdd1e7fa561da8084f69ca698 (diff)
downloadcpython-d15dc06df062fdf0fe8badec2982c6c5e0e28eb0.zip
cpython-d15dc06df062fdf0fe8badec2982c6c5e0e28eb0.tar.gz
cpython-d15dc06df062fdf0fe8badec2982c6c5e0e28eb0.tar.bz2
Implemented thread-local data as proposed on python-dev:
http://mail.python.org/pipermail/python-dev/2004-June/045785.html
Diffstat (limited to 'Doc/lib/libthreading.tex')
-rw-r--r--Doc/lib/libthreading.tex19
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/lib/libthreading.tex b/Doc/lib/libthreading.tex
index f6d7e4d..5ed8e31 100644
--- a/Doc/lib/libthreading.tex
+++ b/Doc/lib/libthreading.tex
@@ -49,6 +49,25 @@ reset to false with the \method{clear()} method. The \method{wait()}
method blocks until the flag is true.
\end{funcdesc}
+\begin{classdesc*}{local}{}
+A class that represents thread-local data. Thread-local data are data
+who's values are thread specific. To manage thread-local data, just
+create an instance of \class{local} (or a subclass) and store
+attributes on it:
+
+\begin{verbatim}
+ >>> mydata = threading.local()
+ >>> mydata.x = 1
+\end{verbatim}
+
+The instance's values will be different for separate threads.
+
+For more details and extensive examples, see the documentation string
+of the _threading_local module.
+
+\versionadded{2.4}
+\end{classdesc*}
+
\begin{funcdesc}{Lock}{}
A factory function that returns a new primitive lock object. Once
a thread has acquired it, subsequent attempts to acquire it block,