Thread.yield
void yield() static nothrowCauses the calling thread to voluntarily relinquish the CPU, so that other threads can run.
This function is often used as a method to make busy wait less evil.
void yield() static nothrowCauses the calling thread to voluntarily relinquish the CPU, so that other threads can run.
This function is often used as a method to make busy wait less evil.