RFR: 8285956: (fs) Excessive default poll interval in PollingWatchService [v4]

Tyler Steele duke at openjdk.java.net
Tue May 3 14:08:15 UTC 2022


On Tue, 3 May 2022 08:20:26 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> Can you move this up to the top of the file so it's with DEFAULT_POLLING_INTERVAL? I thin both will need a short one line comment.

The constants are used in different objects, so I'm not sure there is a sensible way to to do this. A constant reference to a private object might be a way, but that felt like too much indirection.

> I'm not sure about changing it to 1s as it may lead to complaints from macOS users with programs that monitor directories with a large number of files. The right thing is of course to include a native implementation for that platform, some day :-)

Changed to 2s interval between subsequent polls since there have been a few concerns about this :-). I also agree that a native implementation would be far superior.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8479


More information about the nio-dev mailing list