|
tess 1.0.0
Performance-first tile and path simulation substrate
|
#include <tess/experimental/registered_maintenance.h>
Public Member Functions | |
| RegisteredScheduler (std::size_t capacity) | |
| RegisteredScheduler (std::size_t registry_capacity, std::size_t backend_capacity) | |
| RegisteredScheduler (const RegisteredScheduler &)=delete | |
| auto | operator= (const RegisteredScheduler &) -> RegisteredScheduler &=delete |
| RegisteredScheduler (RegisteredScheduler &&)=delete | |
| auto | operator= (RegisteredScheduler &&) -> RegisteredScheduler &=delete |
| auto | register_task (MaintenanceTask &task) -> std::optional< MaintenanceHandle > |
| void | seal () |
| auto | valid (MaintenanceHandle handle) const -> bool |
| auto | try_schedule (MaintenanceHandle handle) -> std::optional< ScheduleResult > |
| auto | schedule (MaintenanceHandle handle) -> ScheduleResult |
| auto | run_some (MaintenanceBudget budget) -> DrainResult |
| auto | flush () -> DrainResult |
| auto | try_release (MaintenanceHandle handle) -> ReleaseResult |
| void | release (MaintenanceHandle handle) |
| auto | metrics () const noexcept -> MaintenanceMetrics |
Fixed-registration handle and result contract over an experimental backend.
Register caller-owned tasks during setup, then call seal() exactly once. A handle belongs to one scheduler owner epoch and remains valid until checked or unchecked release, or scheduler destruction. Tasks are non-owning, non-movable, and must remain alive while registered.
try_schedule() and try_release() are the checked operations for expected stale-handle uncertainty. Their unchecked counterparts fail fast on wrong-owner, stale, or lifecycle misuse in every build. Release never cancels work. After sealing it requires a separate Idle observation made after the last successful schedule; that observation means only that the scheduler has no reachable execution. It does not prove that external dirty state is clean or that world/residency mutation is quiescent.
Callback exceptions propagate verbatim. The throwing invocation and its synchronous call-local reentrant chain are consumed, while independently retained accepted work remains reachable; callers retain authoritative dirty state and explicitly decide whether retry is safe. A callback may schedule through its own registered scheduler, but nested identity, scheduling, drain, or lifecycle operations on a different registered scheduler fail fast, independent of backend type. The no-throw metrics() snapshot remains callable across owners. FIFO and coalescing remain comparison machinery, and wrapping them grants no new execution authority.
|
inlinenodiscard |
Runs reachable work with the backend's unbounded flush policy.
|
inlinenodiscardnoexcept |
Thread-safe read-only snapshot; permitted from any callback owner.
|
inlinenodiscard |
Registers a task during setup; empty reports fixed capacity exhaustion.
|
inline |
Releases a known-live registration or fails fast on lifecycle misuse.
|
inlinenodiscard |
Runs reachable work within a shared unit budget.
|
inlinenodiscard |
Schedules a known-valid handle or fails fast on identity misuse.
|
inline |
Publishes the fixed registry and ends setup.
|
inlinenodiscard |
Checked release. Post-seal release requires a fresh positive Idle result. It never cancels pending work and fixed capacity is not reused post-seal.
|
inlinenodiscard |
Checked scheduling; empty means stale, foreign, or otherwise invalid.
|
inlinenodiscard |
Returns whether a handle currently names a live local registration.