tess 1.0.0
Performance-first tile and path simulation substrate
Loading...
Searching...
No Matches
tess::experimental::maintenance::ImmediateScheduler Class Referencefinal

Synchronous correctness baseline; each schedule call executes immediately. More...

#include <tess/experimental/maintenance.h>

Inheritance diagram for tess::experimental::maintenance::ImmediateScheduler:
tess::experimental::maintenance::MaintenanceScheduler

Public Member Functions

 ImmediateScheduler (std::size_t=0)
auto schedule (MaintenanceTask &task) -> bool override
auto run_some (MaintenanceBudget) -> 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
void set_flow_accounting (diagnostics::FlowAccounting *accounting)
void observe_flow_tick (std::uint64_t tick)

Detailed Description

Synchronous correctness baseline; each schedule call executes immediately.

Member Function Documentation

◆ flush()

auto tess::experimental::maintenance::ImmediateScheduler::flush ( ) -> bool
inlinenodiscardoverridevirtual

Completes all reachable work; see the non-reentrant drain contract above.

Implements tess::experimental::maintenance::MaintenanceScheduler.

◆ has_pending()

auto tess::experimental::maintenance::ImmediateScheduler::has_pending ( ) const -> bool
inlinenodiscardoverridevirtualnoexcept

Returns whether this backend currently retains reachable work.

Implements tess::experimental::maintenance::MaintenanceScheduler.

◆ metrics()

auto tess::experimental::maintenance::ImmediateScheduler::metrics ( ) const -> MaintenanceMetrics
inlinenodiscardoverridevirtualnoexcept

◆ observe_flow_tick()

void tess::experimental::maintenance::ImmediateScheduler::observe_flow_tick ( std::uint64_t tick)
inline

Observes one monotonic tick; the immediate backend never retains work across calls, so only inventory weighting applies.

◆ run_some()

auto tess::experimental::maintenance::ImmediateScheduler::run_some ( MaintenanceBudget budget) -> bool
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.

◆ schedule()

auto tess::experimental::maintenance::ImmediateScheduler::schedule ( MaintenanceTask & task) -> bool
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.

◆ set_flow_accounting()

void tess::experimental::maintenance::ImmediateScheduler::set_flow_accounting ( diagnostics::FlowAccounting * accounting)
inline

Attaches caller-owned flow accounting; null detaches.

Attach or detach only while no schedule call is running; updates happen under the scheduler's lock (serial snapshots).


The documentation for this class was generated from the following file: