This repository was archived by the owner on Aug 3, 2026. It is now read-only.
Feature/esp scheduler v2 - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR promotes
esp-schedulerv2 as the new primary architecture onmain.The motivation is to replace the old v1 task-per-job async design with a scheduler model that is more ESP32-friendly, easier to reason about, and safer around lifecycle and shutdown:
SchedulerCoreSchedulerServicetaskESPSchedulerV1CompatRelated issues: none linked in this PR body.
Type of Change
Details
This PR is not a cosmetic refactor of v1. It introduces a materially different execution architecture for
esp-scheduler.What changed:
SchedulerMode,DispatchPolicy, andOverlapPolicybegin()/end()SchedulerResult<T>ScheduleSpec/ScheduleCalculatorInlineExecutorWorkerPoolExecutorDedicatedTaskExecutorESPWorkerbackendtick()ESPSchedulerV1Compatfor migrationWhy:
tick()ESPWorkerReviewer context / tradeoffs:
Testing
Tests and validation performed:
git diff --checkLocal build status:
piptool-esptoolpypackage missing manifestCommands attempted:
git diff --checkpio ci examples/v2_api_compile ...(blocked by local PlatformIO environment issue)pio ci test/test_esp_scheduler ...(blocked by local PlatformIO environment issue)Compatibility / Breaking Changes
This is a breaking architectural change.
Behavior/API changes:
ESPSchedulerv2 is now the primary API surfacetick()SchedulerResult<T>begin()/end()ESPSchedulerV1Compatexists for migration, but it is not the main APIMigration guidance:
ESPScheduler, orESPSchedulerV1CompatInline->DispatchPolicy::InlineWorkerTask->DispatchPolicy::AsyncRisks and Mitigations
Risks:
Mitigations:
Checklist
Environment
ghCLI was not available in the implementation environment