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

threading.setprofile_all_threads

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


Import

import threading
from threading import setprofile_all_threads

Signature & Overview

threading.setprofile_all_threads(func)

Set a profile 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 profile function to both running and future threads
threading.setprofile_all_threads(None)

Gotchas

REPL Inspect

from threading import setprofile_all_threads
help(setprofile_all_threads)

Linked from

Related notes