"headius (Charles Nutter)" <headius / headius.com> wrote:
> Perf change for an implementation of this in JRuby:

How does this compare to an implementation which returns symbols
like :wait_*able instead of raising exceptions?

> The benefit of this change would be that nonblocking IO has zero
> wasted overhead. The down side would be that the exceptions raised do
> not have a useful backtrace unless debug or verbose.

Exceptions for nonblocking I/O still makes --debug too noisy.

> If we did this change, we would not have to introduce a separate API
> for nonblocking IO that doesn't raise exceptions.

I still think it's better to push for an exception-less API for common
errors.  EAGAIN/EINPROGRESS/EWOULDBLOCK are far too common (and not
reasonably avoidable) to be considered exceptions.