mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 01:28:39 +00:00
a577715d5a7cd6352880f3ccea460d4c5f6b0f23
Add fast-path checks in process_to_add(), cleanup_(), and process_defer_queue_() to skip mutex acquisition when there is nothing to process. Uses std::atomic<uint32_t> counters on platforms with atomics support (ESP32, host), falls back to always taking the lock on platforms without atomics (LibreTiny). Single-threaded platforms (ESP8266, RP2040, nRF52) check directly since there are no concurrent writers. Also migrates existing to_remove_ to the same atomic pattern and moves the defer_queue_.size() snapshot under the lock — both were previously plain reads without the lock while being modified cross-thread.
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
596 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
