Expand description
The shell traits: the only way the runtime spawns work, reads time or waits.
The core (vertep-core) reads no clock and spawns nothing. The runtime shell does both, but
only through Spawn, Clock and Sleep, so that the same runtime runs on tokio
(Shell::tokio), on a deterministic virtual clock in tests (Shell::virtual_time) and,
later, in the browser.
Structs§
- Shell
- The three shell services a runtime node uses.
- System
Clock - The system wall clock.
- Tokio
Sleep - Sleeps with
tokio::time::sleepuntil a time of the given clock. - Tokio
Spawn - Spawns on the current tokio runtime.
- Virtual
Clock - A clock that moves only when
VirtualClock::advanceorVirtualClock::setis called, and wakes the sleepers whose time has come. Cloning shares the clock.
Traits§
- Clock
- The time source of the shell. Only the shell reads it: a macrostep sees the time stamped on its input when the input was dequeued, which is journaled.
- Sleep
- Waits until a point in time of the shell’s
Clock. - Spawn
- Runs a future to completion in the background.
Type Aliases§
- BoxFuture
- A boxed, sendable future.