On this page
threading.gettrace
Prev: threading.getprofile | Up: threading | Next: threading.local
Rel: threading.active_count, threading.Barrier, threading.BoundedSemaphore, threading.BrokenBarrierError
Ref: docs.python.org — threading.gettrace
Tags: #public #python3 #stdlib #threading
Import
import threading
from threading import gettrace
Signature & Overview
threading.gettrace()
Get the trace function as set by threading.settrace().
Usage
import threading
# Returns the trace function registered via threading.settrace() (or None)
assert threading.gettrace() is None or callable(threading.gettrace())
Gotchas
- Requires Python 3.10+: Returns the trace function applied to newly started threads.
REPL Inspect
from threading import gettrace
help(gettrace)
Linked from
Related notes
- tuts/python3/stdlib_module/threading/getprofile Linked here; links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/local Linked here; links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/threading/active_count Linked here; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/Barrier Linked here; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/BoundedSemaphore Linked here; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/BrokenBarrierError Linked here; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/Condition shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/current_thread shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/enumerate shared tags: #stdlib, #threading