OpenJDK 6/7 kqueue based NIO provider
Pieter de Goeje
pieter at degoeje.nl
Sun Jan 31 22:21:53 UTC 2010
On Sunday 31 January 2010 21:23:47 James Mansion wrote:
> Pieter de Goeje wrote:
> > That is an interesting idea, such an implementation could potentially
> > replace all existing back-ends with the exception of the Windows IOCP
> > back-end. However libev doesn't seem to provide a non-blocking poll which
> > is required for NIO (ev_loop always blocks AFAIK).
>
> I'll ask Marc. Would have thought that it wouldn't be too hard to
> arrance an immediate timeout or to register a known-available fd too
> (/dev/null?)
I misread the the documentation, it is in fact possible to do a non-blocking
poll using the aptly named EVLOOP_NONBLOCK flag :-)
I do think that implementing nio using libev is more work than just using
kqueue directly, because the libev API is more complex. Especially
considering the fact that I now have an almost correctly working kqueue
backend here :D.
--
Pieter
More information about the freebsd-java
mailing list