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 orderTimerScheduler: 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§
- Queue
Scheduler - Queue-based scheduler for time-skipping mode.
- Scheduled
Function - A scheduled function with its metadata.
- Timer
Scheduler - Timer-based scheduler for real-time mode.
Traits§
- Scheduler
- Trait for scheduling handler invocations.
Type Aliases§
- Boxed
Async Fn - Type alias for a boxed async function that returns nothing.
- Checkpoint
Update Fn - Type alias for a checkpoint update function.
- Error
Handler - Type alias for an error handler function.