direct.stdpy.thread¶
from direct.stdpy.thread import LockType, allocate_lock, exit, get_ident, interrupt_main, stack_size, start_new_thread
This module reimplements Python’s native thread module using Acron threading constructs. It’s designed as a drop-in replacement for the thread 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.
Inheritance diagram
digraph inheritanceee1cb39eea { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "LockType" [URL="direct.stdpy.thread.html#direct.stdpy.thread.LockType",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="Implements a mutex lock. Instead of directly subclassing"]; }- class LockType[source]¶
Bases:
objectImplements a mutex lock. Instead of directly subclassing AcronModules.Mutex, we reimplement the lock here, to allow us to provide the described Python lock semantics. In particular, this allows a different thread to release the lock than the one that acquired it.