On this page
  1. threading.settrace_all_threads
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

threading.settrace_all_threads

Prev: threading.settrace | Up: threading | Next: threading.stack_size
Rel: threading.active_count, threading.Barrier, threading.BoundedSemaphore, threading.BrokenBarrierError
Ref: docs.python.org — threading.settrace_all_threads
Tags: #public #python3 #stdlib #threading


Import

import threading
from threading import settrace_all_threads

Signature & Overview

threading.settrace_all_threads(func)

Set a trace function for all threads started from the threading module and all Python threads that are currently executing.

Usage

import threading

# Python 3.12+: attaches a trace function to both running and future threads
threading.settrace_all_threads(None)

Gotchas

REPL Inspect

from threading import settrace_all_threads
help(settrace_all_threads)

Linked from

Related notes