mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 09:38:42 +00:00
346e6b40daaf00e8d5263721893c365ba1d50214
Replace the FreeRTOS xQueue (xQueueCreate/xQueueSend/xQueueReceive) used for WiFi event passing with a lock-free SPSC queue. This avoids the FreeRTOS kernel spinlock overhead on every loop iteration when checking for events — the common case is an empty queue. The LockFreeQueue::pop() fast path is just two atomic loads and a comparison, vs xQueueReceive which takes a spinlock, checks the queue, and releases the spinlock even when empty. WiFi events are rare (connect/disconnect/scan) so heap allocation for event data is retained — no EventPool needed unlike the BLE path which processes hundreds of events per second. This matches the lock-free pattern already used by esp32_ble.
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
601 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
