Trait round_based::runtime::AsyncRuntime
source · pub trait AsyncRuntime {
type YieldNowFuture: Future<Output = ()> + Send + 'static;
// Required method
fn yield_now(&self) -> Self::YieldNowFuture;
}Expand description
Required Associated Types§
Required Methods§
sourcefn yield_now(&self) -> Self::YieldNowFuture
fn yield_now(&self) -> Self::YieldNowFuture
Yields the execution back to the runtime
If the protocol performs a long computation, it might be better for performance to split it with yield points, so the signle computation does not starve other tasks.
Implementors§
source§impl AsyncRuntime for TokioRuntime
Available on crate feature runtime-tokio only.
impl AsyncRuntime for TokioRuntime
Available on crate feature
runtime-tokio only.