On Thu, 16 Feb 2023 03:45:28 GMT, Phil Race <p...@openjdk.org> wrote:
>> 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. > > So someone is asking a question when they call this. > Throwing an Exception could be considered an unfriendly way of answering it. > It only makes sense if you think the programmer will have enough information > to be sure that if S/HE does things correctly, it will always be the > FxUserThread that is being used .. ie if we are in an event handler .. as is > supposed to be the case .. and anything else is a blatant programming error > that should be rewarded with an upfront response to that effect. > > So > 1) programming error -> Exception > 2) Can't be sure -> return false. @prrace What is your preference here? Since `enterNestedEventLoop` and `exitNestedEventLoop` throw an exception when not on the fx user thread, I feel like it makes sense to also add it here as well. ------------- PR: https://git.openjdk.org/jfx/pull/1031