On this page
threading.enumerate
Prev: threading.current_thread | Up: threading | Next: threading.Event
Rel: threading.active_count, threading.Barrier, threading.BoundedSemaphore, threading.BrokenBarrierError
Ref: docs.python.org — threading.enumerate
Tags: #public #python3 #stdlib #threading
Import
import threading
from threading import enumerate
Signature & Overview
threading.enumerate()
Return a list of all Thread objects currently alive.
Usage
import threading
threads = threading.enumerate()
assert threading.main_thread() in threads
Gotchas
- Snapshot of alive threads: Excludes threads that haven't been
.start()ed yet or have already terminated.
REPL Inspect
from threading import enumerate
help(enumerate)
Linked from
Related notes
- tuts/python3/stdlib_module/threading/current_thread Linked here; links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/Event 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/excepthook shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/ExceptHookArgs shared tags: #stdlib, #threading