1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-01 09:32:21 +01:00

pool scheduler items

This commit is contained in:
J. Nick Koston
2025-09-02 08:48:39 -05:00
parent 98c1b01fe7
commit 98b8f15576

View File

@@ -759,7 +759,7 @@ void Scheduler::recycle_item_(std::unique_ptr<SchedulerItem> item) {
if (!item)
return;
static constexpr size_t MAX_POOL_SIZE = 16;
static constexpr size_t MAX_POOL_SIZE = 8;
if (this->scheduler_item_pool_.size() < MAX_POOL_SIZE) {
// Clear callback to release captured resources
item->callback = nullptr;