main.get_main_thread

threshold_controller.main.get_main_thread()

Run the main processing loop in a separate thread.

This function creates and starts a background thread that runs the main threshold controller loop. It allows the controller to be stopped via the returned Event object.

Returns

Name Type Description
tuple[threading.Thread, threading.Event] A tuple containing: - threading.Thread: The thread object running the controller loop - threading.Event: Event object that can be .set() to stop the controller