yield() causes the currently executing thread object to temporarily pause and allow other threads with the same to execute.
But yield() method is also dependent on the process scheduling algorithm of the OS, so , in other words, don�t try to use yield() and use sleep() method instead.