On Wed, 15 Feb 2023 20:11:47 GMT, Marius Hanl <mh...@openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line 
>> 396:
>> 
>>> 394:     /**
>>> 395:      * Indicates whether a nested event loop can be started from the 
>>> current thread in the current state.
>>> 396:      * Note that a nested event loop is not allowed outside an event 
>>> handler.
>> 
>> You need to be explicit about whether or not this method must be called on 
>> the JavaFX thread. The two logical choices are:
>> 1. Add a statement indicating that this method must be called on the JavaFX 
>> Application thread. The toolkit method would then call 
>> `checkFxUserThread()`, as do the other nested event loop methods.
>> 2. Add a statement indicating that this method may be called on any thread 
>> (and that it will return false if not on the JavaFX application thread). The 
>> toolkit method would then first call `isFxUserThread()` and return  false if 
>> not.
>> 
>> I might lean towards option 2, but don't have a strong preference.
>
> Should I also adjust the `Toolkit` javadoc or only the `Platform` one?

It might be a good idea to also adjust the Toolkit docs; it doesn't get 
generated as javadoc, but could be useful for someone looking at the code. If 
you do, it wouldn't be part of the CSR, since Toolkit isn't API.

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

PR: https://git.openjdk.org/jfx/pull/1031

Reply via email to