mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 18:48:39 +00:00
51b4b8e743e5a9e4c996dc09c799c2b54823d40b
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
603 MiB
Languages
C++
55.7%
Python
43.7%
C
0.3%
JavaScript
0.2%
