mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
cleanup
This commit is contained in:
@@ -386,7 +386,7 @@ void HOT Scheduler::process_to_add() {
|
||||
void HOT Scheduler::cleanup_() {
|
||||
// Fast path: if nothing to remove, just return
|
||||
// Reading to_remove_ without lock is safe because:
|
||||
// 1. It's volatile, ensuring we read the latest value
|
||||
// 1. We only call this from the main thread during call()
|
||||
// 2. If it's 0, there's definitely nothing to cleanup
|
||||
// 3. If it becomes non-zero after we check, cleanup will happen next time
|
||||
if (this->to_remove_ == 0)
|
||||
|
||||
Reference in New Issue
Block a user