class documentation

class Thread:

Known subclasses: cursers.ThreadedApp

Constructor: Thread()

View In Hierarchy

Basic threading context manager for custom threading needs.

Provides a context manager interface for creating and managing threads. Override the run() method to define the thread's behavior.

Method __enter__ Enter the context and start the thread.
Method __exit__ Exit the context and join the thread.
Method __init__ Initialize the thread manager.
Method run Execute the target method for the thread.
Instance Variable _thread Undocumented
def __enter__(self) -> Self:
overridden in cursers.ThreadedApp

Enter the context and start the thread.

Returns
SelfThe thread instance.
def __exit__(self, *args: object):
overridden in cursers.ThreadedApp

Exit the context and join the thread.

Parameters
*args:objectException information (unused).
def __init__(self):
overridden in cursers.ThreadedApp

Initialize the thread manager.

Creates a new thread manager instance with no active thread.

def run(self):
overridden in cursers.ThreadedApp

Execute the target method for the thread.

Override this method in subclasses to define the thread's behavior. This method is called automatically when the thread starts.

_thread =

Undocumented