_thread — Low-level threading API — Python 3.9.25 documentation

docs.python.org

Tin mới

contextvars — Context Variables

Networking and Interprocess Communication

Python documentation for the current stable release

Python documentation for the current stable release

This module provides low-level primitives for working with multiple threads (also called light-weight processes or tasks) — multiple threads of control sharing their global data space. For synchronization, simple locks (

Python Module Index

3.9.25 Documentation

The Python Standard Library

Concurrent Execution

threading: Thread-based parallelism.

This module provides low-level primitives for working with multiple threads (also called light-weight processes or tasks) — multiple threads of control sharing their global data space. For synchronization, simple locks (

sys.unraisablehook()

Start a new thread and return its identifier. The thread executes the function function with the argument list args (which must be a tuple). The optional kwargs argument specifies a dictionary of keyword arguments.

signal: Set handlers for asynchronous events.

Threads interact strangely with interrupts: the KeyboardInterrupt exception will be received by an arbitrary thread. (When the signal module is available, interrupts always go to the main thread.)