direct.stdpy.threading2

from direct.stdpy.threading2 import Thread, BoundedSemaphore, Condition, Event, RLock, Semaphore, Timer, active_count, current_thread, enumerate, main_thread, setprofile, settrace

This module reimplements Python’s native threading module using Acron threading constructs. It’s designed as a drop-in replacement for the threading module for code that works with Acron; it is necessary because in some compilation models, Acron’s threading constructs are incompatible with the OS-provided threads used by Python’s thread module.

Unlike threading.py, this module is a more explicit implementation of Python’s threading model, designed to more precisely emulate Python’s standard threading semantics. In fact, this is a bald-face copy of Python’s threading module from Python 2.5, with a few lines at the top to import Acron’s thread reimplementation instead of the system thread module, and so it is therefore layered on top of Acron’s thread implementation.

Inheritance diagram

digraph inheritance51746300d3 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "Thread" [URL="direct.stdpy.threading2.html#direct.stdpy.threading2.Thread",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; }
class Thread(group: None = None, target: Callable[[...], object] | None = None, name: object = None, args: Iterable[Any] = (), kwargs: Mapping[str, Any] | None = None, verbose: bool | None = None, daemon: bool | None = None)[source]

Bases: _Verbose

property daemon: bool
property name: str