Any native WatchService implementation planned on Mac OS X for JDK9?

Michael Hall mik3hall at gmail.com
Wed Aug 20 19:01:54 UTC 2014


On Aug 20, 2014, at 9:20 AM, Christopher Brown <christopherbrown06 at gmail.com> wrote:

> The Windows implementation seems to have a poller but doesn't seem to use executors from what I can see (assuming I'm looking in the correct place):
> http://cr.openjdk.java.net/~alanb/7006126/webrev.00/raw_files/new/src/windows/classes/sun/nio/fs/WindowsWatchService.java
> 
> The run() method at the end of that file invokes some "GetQueuedCompletionStatus" function/method which seems to wake up on the event.  Maybe that's helpful to you, I'm not experienced in this area.

Probably current enough to get an idea whats going on. If you really wanted to see current there is probably still a project download page with source to build from.
I had looked at the Windows implantation some time ago, I do not remember it being polling. I can take another look, if it is posable and figures out the updates it might surprisingly be a good OS X choice.
There didn't seem to be a way to wake the executors up early. 
So a little less simple would be a posting version that still uses java to scan the directory, based off the polling version or not. Modifiying the polling version and just using the existing scanning code would be simplest but again possibly a licensing concern.   

Michael Hall

trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz

HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe

AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20140820/84a55eaa/attachment.html>


More information about the nio-dev mailing list