Function aarch64_std::thread::yield_now

source ·
pub fn yield_now()
Expand description

Cooperatively gives up a timeslice to the scheduler.

For multithreading to work effectively, threads must call this function whenever they are willing to be swapped out.

If called within the context of a spawned thread, another pending thread will be swapped in. Otherwise, this will evaluate to an assembly YIELD instruction.

Many functions within this crate such as [sleep] have built-in calls to this function.