in reply to RFC: Proposed module POSIX::Yield
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: Proposed module POSIX::Yield
by tirwhan (Abbot) on Dec 02, 2005 at 17:23 UTC |