ESPHome 2026.7.3
Loading...
Searching...
No Matches
esphome::wifi::ScanResultsLock Class Reference

Guards WiFiComponent::scan_result_. More...

#include <wifi_component.h>

Public Member Functions

 ScanResultsLock (WiFiComponent *parent)
 

Detailed Description

Guards WiFiComponent::scan_result_.

Invariant: every mutation and every read from outside the main loop holds this lock, and holders only do bounded work (never unbounded waits or network sends). On every platform where the lock is enabled (ESP32, LibreTiny) scan-done events are drained from the event queue on the main loop, so all writers are main-loop there and main-loop reads take no lock. Single-threaded platforms write from driver context and the lock is a no-op. Compiles to nothing unless a cross-task reader is in the build and the platform is multi-threaded (WIFI_SCAN_RESULTS_LOCK_ENABLED).

Definition at line 1030 of file wifi_component.h.

Constructor & Destructor Documentation

◆ ScanResultsLock()

esphome::wifi::ScanResultsLock::ScanResultsLock ( WiFiComponent * parent)
inline

Definition at line 1033 of file wifi_component.h.


The documentation for this class was generated from the following file: