class documentation
Extends App to run the update loop in a separate thread.
This class combines the functionality of App and Thread to provide a threaded application that runs the update loop automatically in the background.
Method | __enter__ |
Enter the application context and start the thread. |
Method | __exit__ |
Exit the application context and join the thread. |
Method | __init__ |
Initialize the threaded application. |
Method | run |
Run the update loop in the thread. |
Inherited from App
:
Method | is |
Check if an exit has been requested. |
Method | on |
Handle entering the application context. |
Method | on |
Handle exiting the application context. |
Method | on |
Handle frame updates. |
Method | request |
Request the application to exit. |
Method | update |
Update the application state and handle input. |
Instance Variable | __is |
Undocumented |
Instance Variable | _fps |
Undocumented |
Instance Variable | _is |
Undocumented |
Instance Variable | _keypad |
Undocumented |
Instance Variable | _screen |
Undocumented |
Inherited from Thread
(via App
):
Instance Variable | _thread |
Undocumented |
overrides
cursers.App.__enter__
Enter the application context and start the thread.
Returns | |
Self | The threaded application instance. |
overrides
cursers.App.__exit__
Exit the application context and join the thread.
Parameters | |
*args:object | Exception information (unused). |
overrides
cursers.App.__init__
Initialize the threaded application.
Parameters | |
fps:int | Target frames per second (default: 30). |
keypad:bool | Whether to enable arrow keys (default: False). |
overrides
cursers.Thread.run
Run the update loop in the thread.
This method is called automatically when the thread starts. It continuously calls update() while the application is running.