RFR: 8293067: (fs) Implement WatchService using system library (macOS)
Maxim Kartashev
mkartashev at openjdk.org
Tue Nov 29 08:47:27 UTC 2022
On Tue, 29 Nov 2022 07:13:23 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> I see that in your changes, you use a latency of 0.5 seconds, but the delay I'm seeing in the logs is far greater than that.
This "latency" argument is passed to `FSEventStreamCreate` and is used for to group a (potentially large) number of events:
> "The number of seconds the service should wait after hearing about an event from the kernel before passing it along to the client via its callback. Specifying a larger value may result in more effective temporal coalescing, resulting in fewer callbacks and greater overall efficiency." ([source](https://developer.apple.com/documentation/coreservices/1443980-fseventstreamcreate?language=objc)).
In our case, we don't get even the first event in a hypothetical sequence, so latency does not seem to be involved here.
> FSEventStreamScheduleWithRunLoop is called in the implementation. The macOS documentation for this API states that this is deprecated (since macOS 10.5)
This is indeed the case. Let me look into rewriting this, perhaps.
-------------
PR: https://git.openjdk.org/jdk/pull/10140
More information about the nio-dev
mailing list