From fed833cd270e39df1fff0ab49910226ab3b9c043 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 16 Oct 2025 10:23:40 -1000 Subject: [PATCH] cleanup --- esphome/core/scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/scheduler.cpp b/esphome/core/scheduler.cpp index ebd18fb57e..0d4715f621 100644 --- a/esphome/core/scheduler.cpp +++ b/esphome/core/scheduler.cpp @@ -346,7 +346,7 @@ void HOT Scheduler::call(uint32_t now) { LockGuard lock(this->lock_); // SAFETY: Moving out the unique_ptr leaves a nullptr in the vector at defer_queue_front_. // This is intentional and safe because: - // 1. The vector is only cleaned up by cleanup_defer_queue_() at the end of this function + // 1. The vector is only cleaned up by cleanup_defer_queue_locked_() at the end of this function // 2. Any code iterating defer_queue_ MUST check for nullptr items (see mark_matching_items_removed_ // and has_cancelled_timeout_in_container_ in scheduler.h) // 3. The lock protects concurrent access, but the nullptr remains until cleanup