Are these two statement equivalent?
Thread.sleep(0); Thread.yield();
Yield adds the current thread to the ready queue and allows other threads to run. Sleep is not guaranteed to relinquish the cpu.