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::Executor};
let (executor, runtime, auditor) = Executor::default();
executor.start(async move {
println!("Parent started");
let result = runtime.spawn("child", async move {
println!("Child started");
"hello"
});
println!("Child result: {:?}", result.await);
println!("Parent exited");
});
println!("Auditor state: {}", auditor.state());Structs§
- Track the state of the runtime for determinism auditing.
- Implementation of
crate::Blobfor thedeterministicruntime. - Configuration for the
deterministicruntime. - Implementation of
crate::Spawner,crate::Clock,crate::Network, andcrate::Storagefor thedeterministicruntime. - Deterministic runtime that randomly selects tasks to run based on a seed.
- Implementation of
crate::Listenerfor thedeterministicruntime. - Implementation of
crate::Runnerfor thedeterministicruntime. - Implementation of
crate::Sinkfor thedeterministicruntime. - Implementation of
crate::Streamfor thedeterministicruntime.
Type Aliases§
- Map of names to blob contents.