
From: "Jonathan Turkanis" <technews@kangaroologic.com>
Rob Stewart wrote:
I don't see how "would_block" can be construed as "unix-y" since it merely indicates that the requested operation would have blocked had it not returned that value.
I got the name from EWOULDBLOCK. Maybe I should have said posix-y?
I wasn't quibbling over unix versus posix, just that "would block" is not a phrase that immediately connotes unix.
Other options would be:
unavailable if (read(...) == unavailable) not_now if (read(...) == not_now) nothing_now if (read(...) == nothing_now) maybe_later if (read(...) == maybe_later)
:-)
I think if you keep calling read like above, the failure messages should get stronger and stronger:
if (read(...) == unavailable) { } if (read(...) == unavailable) { } if (read(...) == i_said_unavailable) { } if (read(...) == are_you_a_complete_idiot)
LOL! -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;