Expand description
A deterministic runtime that randomly selects tasks to run based on a seed
§Panics
If any task panics, the runtime will panic (and shutdown).
§Example
use commonware_runtime::{Spawner, Runner, deterministic, Metrics};
let executor = deterministic::Runner::default();
executor.start(|context| async move {
println!("Parent started");
let result = context.with_label("child").spawn(|_| async move {
println!("Child started");
"hello"
});
println!("Child result: {:?}", result.await);
println!("Parent exited");
println!("Auditor state: {}", context.auditor().state());
});Structs§
- Auditor
- Track the state of the runtime for determinism auditing.
- Config
- Configuration for the
deterministicruntime. - Context
- Implementation of crate::Spawner, crate::Clock,
crate::Network, and crate::Storage for the
deterministicruntime. - Executor
- Deterministic runtime that randomly selects tasks to run based on a seed.
- Listener
- Implementation of crate::Listener for the
deterministicruntime. - Runner
- Implementation of crate::Runner for the
deterministicruntime. - Sink
- Implementation of crate::Sink for the
deterministicruntime. - Stream
- Implementation of crate::Stream for the
deterministicruntime.
Type Aliases§
- Partition
- Map of names to blob contents.