Skip to main content

Module scheduler

Module scheduler 

Source
Expand description

Scheduler implementations for test execution orchestration.

This module provides scheduler implementations that manage when handler re-invocations occur during test execution. Two implementations are provided:

  • QueueScheduler: For time-skipping mode, processes functions in FIFO order
  • TimerScheduler: For real-time mode, respects actual timestamps using tokio timers

§Requirements

  • 17.1: WHEN time skipping is enabled, THE Scheduler SHALL use a queue-based approach that processes operations in FIFO order
  • 17.2: WHEN time skipping is disabled, THE Scheduler SHALL use timer-based scheduling that respects actual timestamps
  • 17.3: WHEN a function is scheduled, THE Scheduler SHALL execute any checkpoint updates before invoking the handler
  • 17.4: WHEN the scheduler has pending functions, THE Scheduler SHALL report that scheduled functions exist via has_scheduled_function()
  • 17.5: WHEN execution completes, THE Scheduler SHALL flush any remaining scheduled functions

Structs§

QueueScheduler
Queue-based scheduler for time-skipping mode.
ScheduledFunction
A scheduled function with its metadata.
TimerScheduler
Timer-based scheduler for real-time mode.

Traits§

Scheduler
Trait for scheduling handler invocations.

Type Aliases§

BoxedAsyncFn
Type alias for a boxed async function that returns nothing.
CheckpointUpdateFn
Type alias for a checkpoint update function.
ErrorHandler
Type alias for an error handler function.