At times, your application can benefit when a thread yields the processor to another thread in the system.
When a thread yields the processor, it immediately allows another equal or higher priority thread that is active in the system to run. If no threads of at least equal priority are currently ready to run, yielding the processor has no effect. Beyond the immediate action, yielding the processor does not have any additional predictable behavior related to the scheduling of the threads in the system.
The iSeries™ server provides a fully preemptive multitasking scheduling algorithm. A thread that exists in a well-written application should seldom need to yield the processor to other threads. This is because more predictable application programming interfaces (APIs) for synchronizing threads are available.