Skip to main content

DisplayThread

This class provides a dedicated execution thread for managing a display's rendering cycle. It continuously triggers the display's draw and sleep methods in a loop until a shutdown signal is received.

Attributes

AttributeTypeDescription
displayobjectThe display object instance that this thread manages for periodic drawing and napping operations.
shutdownboolean = FalseA boolean control flag used to signal the thread's run loop to terminate when set to True.

Constructor

Signature

def DisplayThread(
display: object
) - > null

Parameters

NameTypeDescription
displayobjectThe display object used for drawing and napping operations.

Signature

def DisplayThread(
display: object
) - > null

Parameters

NameTypeDescription
displayobjectThe display hardware or interface object responsible for rendering and timing control.

Methods


run()

@classmethod
def run() - > null

Executes the main display loop, repeatedly triggering draw updates and pausing for the required interval until the thread is signaled to shut down.

Returns

TypeDescription
nullNone