diff --git a/esphome/core/scheduler.h b/esphome/core/scheduler.h index f187549fb2..c73bd55d5d 100644 --- a/esphome/core/scheduler.h +++ b/esphome/core/scheduler.h @@ -241,7 +241,8 @@ class Scheduler { // Helper to check if item is marked for removal (platform-specific) // Returns true if item should be skipped, handles platform-specific synchronization - // NOTE: For ESPHOME_THREAD_MULTI_NO_ATOMICS, caller must hold lock! + // For ESPHOME_THREAD_MULTI_NO_ATOMICS platforms, the caller must hold the scheduler lock before calling this + // function. bool is_item_removed_(SchedulerItem *item) const { #ifdef ESPHOME_THREAD_MULTI_ATOMICS // Multi-threaded with atomics: use atomic load for lock-free access @@ -255,7 +256,8 @@ class Scheduler { } // Helper to mark item for removal (platform-specific) - // NOTE: For ESPHOME_THREAD_MULTI_NO_ATOMICS, caller must hold lock! + // For ESPHOME_THREAD_MULTI_NO_ATOMICS platforms, the caller must hold the scheduler lock before calling this + // function. void mark_item_removed_(SchedulerItem *item) { #ifdef ESPHOME_THREAD_MULTI_ATOMICS // Multi-threaded with atomics: use atomic store