RFR: 8293067: (fs) Implement WatchService using system library (macOS) [v8]
Michael Hall
mik3hall at gmail.com
Mon Nov 14 03:08:44 UTC 2022
> On Nov 13, 2022, at 9:35 AM, Alan Bateman <alanb at openjdk.org> wrote:
>
> On Wed, 2 Nov 2022 06:25:03 GMT, Maxim Kartashev <mkartashev at openjdk.org> wrote:
>
>>> @mkartashev I made some minor changes to the CSR. Was the property name previously agreed upon? I would tend to drop the `.use` from the end of it.
>>
>>> Was the property name previously agreed upon?
>>
>> Nope. Please, rename as you see fit, I really have no preference nor do I have any experience in CSRs.
>
> If we can get the new implementation stable then it might not be worth including the polling implementation in the macOS build. The make file that controls whether PollingWatchService is included or not is in make/modules/java.base/Java.gmk.
>
> -------------
>
> PR: https://git.openjdk.org/jdk/pull/10140
This still doesn’t appear to show local errors for me. I ran a modified LotsOfEvents 5 times which should amount to actually 25 test runs including concurrently. Without an error.
public static void main(String[] args) throws Exception {
new LotsOfEvents().runTests();
}
private void runTests() {
ExecutorService taskList
= Executors.newFixedThreadPool(2);
taskList.execute(new TestRunner(1));
taskList.execute(new TestRunner(2));
taskList.execute(new TestRunner(3));
taskList.execute(new TestRunner(4));
taskList.execute(new TestRunner(5));
taskList.shutdown();
}
OS/X 12.6 Monterey
/Users/mjh/Documents/GitHub/jdk/build/*/images/jdk/bin/java -version
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc.mjh.jdk)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc.mjh.jdk, mixed mode, sharing)
Sample output…
/Users/mjh/Documents/GitHub/jdk/build/*/images/jdk/bin/java LotsOfEvents
Seed from RandomFactory = 6528454270926080835L
watcher sun.nio.fs.MacOSXWatchService at 6aa1966b class sun.nio.fs.MacOSXWatchService
watcher sun.nio.fs.MacOSXWatchService at 3ddb944c class sun.nio.fs.MacOSXWatchService
Polling retrieved 1 event(s)
Polling retrieved 1 event(s)
Polling retrieved 1 event(s)
Polling retrieved 1 event(s)
1 overflow elapsed 32644
2 overflow elapsed 32642
…
watcher sun.nio.fs.MacOSXWatchService at 4298fd66 class sun.nio.fs.MacOSXWatchService
Polling retrieved 1 event(s)
Polling retrieved 1 event(s)
5 overflow elapsed 32214
5queuing elapsed 25096
More information about the nio-dev
mailing list