threads::yield is portable across platforms and does much the same thing as your code under Linux.
I tend to use Win32::Sleep $milliseconds; to yield the processor inside poll-type loops, because it allows me to strike a balance between responsivness and threashing the processor to death.
If shed_yield() has application outside of threaded code, perhaps you could offer a patch to the POSIX module?
In reply to Re: RFC: Proposed module POSIX::Yield
by BrowserUk
in thread RFC: Proposed module POSIX::Yield
by tirwhan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |