This module provides one function,
sched_yield(),
which executes the POSIX.1b sched_yield system call.
It relinquishes the processor without blocking,
allowing other processes to run.
This does not change the process priority (see the nice function from the POSIX module for that),
so if your process is currently the one with the highest priority it will continue to run without interruption.
See the sched_yield(2) man page and your operating systems scheduling documentation for more details.

On most systems,
the threads module method yield() will also use the sched_yield system call,
so you can use that instead,
if you prefer.
POSIX::SchedYield is more explicit,
will work with older and unthreaded versions of Perl,
and will always call sched_yield,
whereas the threads implementation may change at some point.

This will yield the processor when a process is unable to obtain a lock, thus hopefully giving control back to another process which is handling the lock at the moment and allowing it to be released. You should not use sched_yield this way if you're expecting the lock to be held for any extended period of time (for example if the locking process waits for I/O with the lock held), because this will cause your yielding process to hog the CPU as it retries,yields,retries,yields etc.