On Fri, 5 May 2023 13:53:51 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

> Something I was wondering:

> Use of InternalLock can be disabled with -Djdk.io.useMonitors=true

> But should we have a property to force the use of InternalLock (when enabled) 
> even in the presence of custom handlers subclasses? We could use 
> -Djdk.io.useMonitors=false to mean that - or introduce a new system property 
> specific to java.util.logging.Handlers.

If at all we want to always use an `InternalLock` irrespective of the 
`-Djdk.io.useMonitors` system property, then perhaps a simpler way might be to 
introduce new `public static InternalLock newLock()` in `InternalLock` class, 
which then doesn't check the system property and instead will always return a 
new lock. That way we wouldn't have to introduce any new system property. That 
would also mean that we don't expose this control to the application/user, 
which I think would be a good thing since it's my opinion that this is a bit 
too complex detail to be configured by the applicaiton.

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

PR Comment: https://git.openjdk.org/jdk/pull/13832#issuecomment-1543446553

Reply via email to