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

threading.settrace

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


Import

import threading
from threading import settrace

Signature & Overview

threading.settrace(func)

Set a trace function for all threads started from the threading module.

Usage

import threading

# Registers a trace function for all *future* Thread objects started via threading
threading.settrace(None)

Gotchas

REPL Inspect

from threading import settrace
help(settrace)

Linked from

Related notes