v4.0.4:
2025-11-15:
- bug: set callbacks should not be available for _TASK_OO_CALLBACKS mode
v4.0.5:
2026-04-16:
- bug fix: use-after-free in Scheduler::execute() when a callback destroys
the next task in the chain (e.g. painlessMesh BufferedConnection teardown).
Promoted nextTask to scheduler member iNextExecute so deleteTask() can
advance it before the memory is freed.
v4.0.6:
2026-04-17:
- bug fix: thread-safe setSelfDestruct request called wrong function
(setSchedulingOption instead of setSelfDestruct)
- bug fix: NULL pointer dereference in disable() when iScheduler is NULL
(triggered when a still-enabled task is removed via deleteTask then destroyed)
- bug fix: dangling pointer in disableAll() and enableAll() -- applied the
same iNextExecute pattern used in execute() to protect against callbacks
that destroy the next task in the chain
- bug fix: missing NULL check on iStatusRequest in execute() status request
handling -- could crash if waiting flag was set but no StatusRequest assigned
- added NULL safety to currentLts() and isOverrun() public API methods
- initialized iActiveTasks/iTotalTasks/iInvokedTasks in Scheduler::init()
- clarified assignment-in-condition in StatusRequest::signal()
- added documentation comments for known limitations: thread-safe request
pointer lifetime, millis() rollover in tickless mode, signed overflow in
overrun calculations, execute() re-entrancy, pointer truncation on >32-bit
v4.0.7:
2026-04-17:
- feature: deprecated currentTask() now returns a safe sentinel instead of
crashing when called outside a task callback (iCurrent == NULL)
- feature: added getChainLength() method to Scheduler -- returns the number
of tasks in the chain at any time, without requiring an execute() pass.
Maintained via O(1) counter in addTask/deleteTask.
v4.0.8:
2026-04-20:
- bug fix: Scheduler::currentTask() failed to compile under _TASK_OO_CALLBACKS
because the static Task sDummy sentinel introduced in v4.0.7 cannot be
instantiated (Task is abstract when OO callbacks are enabled -- Callback()
is pure virtual). Replaced with a local concrete subclass that stubs out
Callback() in OO mode; function-pointer mode path is unchanged.
- example: Scheduler_example21_OO_Callbacks -- silenced signed/unsigned
compare warning in SuperSensor::measurementReady() by casting iDelay to
unsigned long.