pub async fn yield_async()
Expand description
The asynchronous counterpart to yield_blocking
.
This function does not block the current task but instead gives the Rust-level executor a chance to yield control back to the host temporarily. This means that other Rust-level tasks may also be able to progress during this yield operation.
§Return Value
Unlike yield_blocking
this function does not return anything. If this
component task is cancelled while paused at this yield point then the future
will be dropped and a Rust-level destructor will take over and clean up the
task. It’s not necessary to do anything with the return value of this
function other than ensuring that you .await
the function call.