mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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.
This commit is contained in:
parent
db6434c474
commit
0001a1b69e
5 changed files with 61 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue