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

threading.active_count

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


Import

import threading
from threading import active_count

Signature & Overview

threading.active_count()

Return the number of Thread objects currently alive.

Usage

import threading

assert threading.active_count() >= 1

Gotchas

REPL Inspect

from threading import active_count
help(active_count)

Linked from

Related notes