More data on task provided in jepri's to the top post below
It's my understanding that select does the exact thing you want.
You set up the list of open files you want to know if you can read from/write to (or both) and call select. The OS then blocks you until one of those files (sockets) is ready to go then wakes you and tells you which file is ready even. You can set a timeout in case you really do want to do something after a while even if no files are ready to go.
This would seem to give you a wait which is over at exactly the correct time and you don't even get called on slices where you nothing to do at all.
In reply to Re: I want to forfeit my timeshare
by dga
in thread I want to forfeit my timeshare
by jepri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |