Jos Backus <jos / catnook.com> wrote:
> On Mon, May 21, 2012 at 4:47 PM, Eric Wong <normalperson / yhbt.net> wrote:
> > With the self-pipe trick, your ubf() will probably just be:
> >
> Or use pselect(2). Not sure how portable that is though.

Iaki's using libuv/uv_run() as a wrapper to avoid using
epoll/poll/kqueue/select/etc.. directly, so I don't think pselect()
would work for him.

Normally, regular select() will just stop with EINTR and that's all Ruby
needs to reacquire the GVL.  IO.select internally retries on EINTR, but
only after running signal handlers and processing Thread#raise/#kill
requests.