RFR: 8297275: WatchService delay with PollingWatchService causes test failures

Tyler Steele tsteele at openjdk.org
Mon Nov 21 22:03:22 UTC 2022


On Fri, 21 Oct 2022 21:43:25 GMT, Tyler Steele <tsteele at openjdk.org> wrote:

> This minor change fixes a compliance test failure which was partially addressed by https://github.com/openjdk/jdk/commit/1bb4de2e2868a539846ec48dd43fd623c2ba69a5. However the failure was still observed on select machines. This change addresses the remaining failures by ensuring that any new WatchKey is held until the polling thread becomes active.

This is another possible solution. I wanted to err on the side of the failure being valid. Once the call to `register()` completes, I think it's fair to expect that the WatchKey is active.

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

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


More information about the nio-dev mailing list