[−][src]Function kayrx::karx::yield_now
pub async fn yield_now()
Cooperatively gives up a timeslice to the karx 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.
See also karx::block
.
Examples
Basic usage:
use kayrx::karx; karx::yield_now().await;