RFR: 8293067: (fs) Implement WatchService using system library (macOS)

Maxim Kartashev mkartashev at openjdk.org
Mon Oct 3 11:34:36 UTC 2022


On Mon, 3 Oct 2022 10:35:44 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> The suggestion was to explore doing this at a low level with kqueue so that we don't have callbacks.

Vladimir Kempik had a draft implementation based on kqueue that, AFAIR, passed all the existing tests; he may be interested in getting his work merged into the mainline.

My primary concern with this approach is that it doesn't give a lot of advantage over `PollingWatchService` when you need to watch for changes in a very deep hierarchy of directories, the main use case for my employer. At the same time FSEvents API naturally provide the ability for recursive watch almost for free resource-wise.

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

PR: https://git.openjdk.org/jdk/pull/10140


More information about the nio-dev mailing list