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

Michael Hall mik3hall at gmail.com
Tue Nov 22 08:27:20 UTC 2022



> On Nov 22, 2022, at 1:46 AM, Maxim Kartashev <maxim.kartashev at jetbrains.com> wrote:
> 
> 
> 
> On Mon, Nov 21, 2022 at 5:52 PM Michael Hall <mik3hall at gmail.com <mailto:mik3hall at gmail.com>> wrote:
> 
> For me this still continues to run flawlessly. I haven’t been able to break it trying. So the property might still make sense for some users?
> 
> I imagine it would, except that I can't figure out how to marry this option with tests failing ever so often. If we run tests without that option, it means that the code is never tested. If we run them with the option, those will fail *occasionally*, making the whole test run appear unreliable. 

For now the option would probably have to be off for testing. Assuming it’s a bug that Apple is working on. Have you tried filing to see what they say?
Possibly the jdk won’t allow having untested code included, then if you don’t expect the bug to be fixed soon you might want to provide the watch service as a 3rd party one somehow such as on GitHub.
Obviously not as good as having the jdk itself provide it, and you might want to include caveats that it sometimes has shown issues. 
But there seemed to be situations where it’s use might have advantages over polling, for what testing I’ve done it has run successfully and I would guess there would be some interest.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20221122/867d9aae/attachment.htm>


More information about the nio-dev mailing list