summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-10-16 14:54:22 (GMT)
committerFred Drake <fdrake@acm.org>2001-10-16 14:54:22 (GMT)
commit64d786379774f66e1205a5f86924b2586acfffd1 (patch)
tree7d1f9d86505ce935ccbe6a5651065d8e8fcde503 /Doc
parenta8159164725c77abe7555e74a315976712c99aaa (diff)
downloadcpython-64d786379774f66e1205a5f86924b2586acfffd1.zip
cpython-64d786379774f66e1205a5f86924b2586acfffd1.tar.gz
cpython-64d786379774f66e1205a5f86924b2586acfffd1.tar.bz2
Added information about setprofile() and settrace() hooks being thread-
specific, and updated some of the comments about the profile hook. This closes SF bug #471725.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libsys.tex11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index 6e880ea..09891e0 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -369,7 +369,11 @@ else:
information on the Python profiler. The system's profile function
is called similarly to the system's trace function (see
\function{settrace()}), but it isn't called for each executed line
- of code (only on call and return and when an exception occurs).
+ of code (only on call and return, but the return event is reported
+ even when an exception has been set). The function is
+ thread-specific, but there is no way for the profiler to know about
+ context switches between threads, so it does not make sense to use
+ this in the presence of multiple threads.
Also, its return value is not used, so it can simply return
\code{None}.
\end{funcdesc}
@@ -389,7 +393,10 @@ else:
Set the system's trace function,\index{trace function} which allows
you to implement a Python source code debugger in Python. See
section \ref{debugger-hooks}, ``How It Works,'' in the chapter on
- the Python debugger.\index{debugger}
+ the Python debugger.\index{debugger} The function is
+ thread-specific; for a debugger to support multiple threads, it must
+ be registered using \function{settrace()} for each thread being
+ debugged.
\end{funcdesc}
\begin{datadesc}{stdin}