summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMario Corchero <mcorcherojim@bloomberg.net>2020-11-04 09:27:43 (GMT)
committerGitHub <noreply@github.com>2020-11-04 09:27:43 (GMT)
commit0001a1b69ecda47b0406daa88c2943877580bcae (patch)
tree3b9a00c8fc1c9602aa77313e029330b43d81bd93 /Doc/library
parentdb6434c474f7389a98b8118ca87fca988416bf33 (diff)
downloadcpython-0001a1b69ecda47b0406daa88c2943877580bcae.zip
cpython-0001a1b69ecda47b0406daa88c2943877580bcae.tar.gz
cpython-0001a1b69ecda47b0406daa88c2943877580bcae.tar.bz2
bpo-42251: Add gettrace and getprofile to threading (GH-23125)
This allows to retrieve the functions that were set in these two, which might differ from sys.gettrace and sys.getprofile within a thread.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/threading.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 7eb12fe..e05486f 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -121,6 +121,17 @@ This module defines the following functions:
:meth:`~Thread.run` method is called.
+.. function:: gettrace()
+
+ .. index::
+ single: trace function
+ single: debugger
+
+ Get the trace function as set by :func:`settrace`.
+
+ .. versionadded:: 3.10
+
+
.. function:: setprofile(func)
.. index:: single: profile function
@@ -130,6 +141,15 @@ This module defines the following functions:
:meth:`~Thread.run` method is called.
+.. function:: getprofile()
+
+ .. index:: single: profile function
+
+ Get the profiler function as set by :func:`setprofile`.
+
+ .. versionadded:: 3.10
+
+
.. function:: stack_size([size])
Return the thread stack size used when creating new threads. The optional