7131697 :(se) Need AsynchronousChannelProvider implementation

Michael McMahon michael.x.mcmahon at oracle.com
Fri Jan 27 06:47:02 PST 2012


Very impressive. And so little native code as well .

One question. Since you use the ONESHOT mode, does that not mean
only one read (or write) operation can be outstanding on a channel at 
the same time?

One minor nit. The test in DefaultAsynchronousChannelProvider.java
should probably be startsWith("Mac OS");

Thanks,
Michael.

On 27/01/12 13:35, Alan Bateman wrote:
>
> The Mac port doesn't currently have an implementation of the 
> asynchronous I/O API and so all tests for this area, including JCK 
> tests, are failing. I've whipped up an initial implementation based on 
> kqueue and put the webrev here:
>
> http://cr.openjdk.java.net/~alanb/7131697/webrev/
>
> It's very simple and works very similarly to the the epoll based 
> implementation that we have on Linux. It passes all tests on both 
> 10.6.8 and 10.7. In summary, each channel group has a kernel queue and 
> channels associated with the group register for events on that queue. 
> The channel group's thread pool services the events. The events are 
> retrieved in batch by a leader thread that makes them available to any 
> other threads. There is clearly some performance work that needs to be 
> done around this but it's not critical in the short term.
>
> Note that that sun.nio.ch.KQueue is its own class so that we can 
> re-use in a re-work of Apple's kqueue based Selector implementation. 
> That Selector needs a bit of work in order to pass all tests and so is 
> not currently used by default. Another thing to mention is that I 
> updated the mapfile although that doesn't appear to be used in the 
> current build.
>
> -Alan.
>



More information about the macosx-port-dev mailing list