-
Bug
-
Resolution: Fixed
-
P3
-
internal
This was discovered during the code review:
Roger Riggs wrote:
-----------------------------------------------
Having support for the ToolProvider is great.
However, there is no indication about whether it is valid to use it from multiple threads.
The implementation is structured to be deliberately single thread use only
with the invocation being via a static method and the logging being via static methods.
There will need to be a disclaimer and perhaps an exception should be thrown.
A future improvement:
The implementation should be methods on the instance created by the ToolProvider
and the logging relative to that instance/delegated where needed.
Main can then be a simple lookup of the tool provider and invoke.
-----------------------------------------------
For JDK 13, we either need to document the current limitation (e.g., in an @implNote) or we need to serialize access by synchronizing the static Main::run methods.
I filedJDK-8223322 to track the suggested future improvement.
Roger Riggs wrote:
-----------------------------------------------
Having support for the ToolProvider is great.
However, there is no indication about whether it is valid to use it from multiple threads.
The implementation is structured to be deliberately single thread use only
with the invocation being via a static method and the logging being via static methods.
There will need to be a disclaimer and perhaps an exception should be thrown.
A future improvement:
The implementation should be methods on the instance created by the ToolProvider
and the logging relative to that instance/delegated where needed.
Main can then be a simple lookup of the tool provider and invoke.
-----------------------------------------------
For JDK 13, we either need to document the current limitation (e.g., in an @implNote) or we need to serialize access by synchronizing the static Main::run methods.
I filed
- relates to
-
JDK-8223322 Improve concurrency in jpackage instances
- Closed