How about "conditions" instead of "predicates"? Also, at the expense of changing your API, it might be clearer if the functions names themselves were less like perl functions and more intuitively descriptive.
- read -> readable
- write -> writeable
- sleep -> timeout
My thought is that since these aren't actually executed immediately, it would be better to have names that describe the activating condition rather than names that sound like an imperative.
For documentation, I'd strongly suggest separating the perl signature from the context arguments. E.g.
read($callback) -- context stack: $filehandle, $deadline = undef
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.