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

threading.main_thread

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


Import

import threading
from threading import main_thread

Signature & Overview

threading.main_thread()

Return the main thread object.

Usage

import threading

assert threading.current_thread() is threading.main_thread()

Gotchas

REPL Inspect

from threading import main_thread
help(main_thread)

Linked from

Related notes