RFR: JDK-8223322: Improve concurrency in jpackage instances

Alexey Semenyuk asemenyuk at openjdk.java.net
Thu Dec 17 23:33:00 UTC 2020


On Thu, 17 Dec 2020 23:24:02 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> Remove all non final static variables in jpackage java code (using InheritableThreadLocal for Logger and Argument instances) and remove sychronization in JPackageToolProvider.
>
> Changes requested by asemenyuk (Committer).

I'd propose to update the test to run more that two concurrent instance of jpackage command.

> test/jdk/tools/jpackage/share/ConcurrentTest.java line 68:
> 
>> 66: 
>> 67:         cmd1.useToolProvider(false);
>> 68:         cmd1.useToolProvider(false);
> 
> Shouldn't this be `cmd2`?

I'd parametrize the test function with `useToolProvider` parameter. This will help to avoid copy/paste of `TKit.assertTrue(times...)`

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

PR: https://git.openjdk.java.net/jdk/pull/1829


More information about the core-libs-dev mailing list