|
tess 1.0.0
Performance-first tile and path simulation substrate
|
#include <tess/experimental/maintenance.h>
Public Member Functions | |
| DirtyBitScheduler (std::size_t capacity) | |
| auto | register_task (MaintenanceTask &task) -> bool |
| void | seal () |
| auto | schedule (MaintenanceTask &task) -> bool override |
| auto | run_some (MaintenanceBudget budget) -> bool override |
| auto | flush () -> bool override |
| Completes all reachable work; see the non-reentrant drain contract above. | |
| auto | metrics () const noexcept -> MaintenanceMetrics override |
| auto | has_pending () const noexcept -> bool override |
Coalescing scheduler backed by registered task bits.
Register every task during setup, before scheduling or draining begins. Registration is idempotent for the same task and bounded by the constructor capacity. Call seal() after registration; it publishes the immutable registry to concurrent producers. Tasks remain non-owning and must outlive this scheduler or a completed flush(). Registration order defines deterministic drain order. Destroying the scheduler drops pending work without executing it. A thread's first successful post-seal schedule() or first task execution may initialize platform thread-local runtime state; later scheduling on that thread is allocation-free.
|
inlinenodiscardoverridevirtual |
Completes all reachable work; see the non-reentrant drain contract above.
Implements tess::experimental::maintenance::MaintenanceScheduler.
|
inlinenodiscardoverridevirtualnoexcept |
Returns whether this backend currently retains reachable work.
Implements tess::experimental::maintenance::MaintenanceScheduler.
|
inlinenodiscardoverridevirtualnoexcept |
|
inlinenodiscard |
Registers one task during setup; false reports exhausted capacity.
|
inlinenodiscardoverridevirtual |
Runs reachable work until the queue or supplied budget is exhausted.
Do not call this or flush() from MaintenanceTask::run(): queued backends serialize drains with a non-recursive lock. schedule() is the only reentrant scheduler operation supported from a running task.
Implements tess::experimental::maintenance::MaintenanceScheduler.
|
inlinenodiscardoverridevirtual |
Schedules derived-state work.
The task must outlive this scheduler or an explicit flush(). A false result reports bounded capacity exhaustion, incomplete backend setup, an unknown task identity, or a backend that cannot make progress; authoritative state must retain its dirty signal so a caller can retry.
Implements tess::experimental::maintenance::MaintenanceScheduler.
|
inline |
Publishes the completed registry and ends the setup phase.