Expand description
A production-focused runtime based on Tokio with secure randomness.
§Panics
By default, the runtime will catch any panic and log the error. It is possible to override this behavior in the configuration.
§Example
use commonware_runtime::{Spawner, Runner, tokio::{Config, Executor}};
let (executor, runtime) = 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");
});
Structs§
- Configuration for the
tokio
runtime. - Runtime based on Tokio.
- Implementation of
crate::Runner
for thetokio
runtime.