Nice setup—this kind of producer–consumer structure makes a lot of sense for keeping things responsive. Splitting tasks into separate threads like that is a clean approach, especially for MQTT and sensor handling https://www.youtube.com/watch?v=5v6zZLt-e-4/space waves
Ask Best Practices for Building a Smart Thermostat with RT-Thread and MQTT?