mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
ce6332e6c3128d3baeeaeb918bc0405cb6975159
The pre-sleep scan of all monitored sockets was added to preserve select() semantics by checking for pending data before sleeping. However, this is unnecessary with the FreeRTOS task notification approach: - xTaskNotifyGive from the lwip callback persists until consumed by ulTaskNotifyTake, so notifications received while the task is running (not sleeping) are not lost. - The only case the scan caught was intentionally undrained sockets (e.g., API's MAX_MESSAGES_PER_LOOP=5 throttle). Adding up to 16ms (loop_interval) latency before re-checking undrained data is the desired behavior — waking immediately would defeat the purpose of the throttle which exists to let other components run. This removes N volatile cross-core reads (one per monitored socket) from every loop iteration.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
546 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
