Function ksched::task::yield_now [−][src]
pub async fn yield_now()
Expand description
Cooperatively gives up a timeslice to the task scheduler.
Calling this function will move the currently executing future to the back of the execution queue, making room for other futures to execute. This is especially useful after running CPU-intensive operations inside a future.
Examples
ksched::task::yield_now().await;