On Tue, 6 May 2025 19:26:11 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> That would be okay, except that `Scene` is allowed to be created on a 
>> background thread (it's in the class documentation), so we can't completely 
>> enforce it to be single-threaded. Once a scene is created, a user can also 
>> request its preferences. This is when we need some way to get the current 
>> platform preferences on a background thread, as otherwise users would 
>> potentially see the scene preferences suddenly change once the scene is 
>> shown.
>
> That's why I am against this background thread nonsense.  Create - yes (even 
> though I am against this).  Access and modify properties, especially those 
> that interact with other parts of the FX - no.
> 
> I think we should enforce the FX application thread access.

This would be a significant change, as currently `Scene` is explicitly allowed 
to be created _and modified_ on a background thread. This was probably always a 
very bad idea (because it makes the implementation so much more difficult), but 
how do you think we should change that?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1655#discussion_r2076223572

Reply via email to