joyent/libuv — pull request #1050 by indutny (2013-12-20 21:51:01+00:00)
Title: stream: fix uv__stream_osx_select

Relying on `readable`/`writable` when polling will lead to the select
thread spinning in the loop and calling `uv_async_send()`, because
stream may never become not `readable`/`writable`.

We should rely on `uv__io_active()` instead and interruprt select thread
every time it changes.

/cc @saghul see https://github.com/joyent/node/issues/6733#issuecomment-30916143