JavaFX Threading

John C. Turnbull ozemale at ozemail.com.au
Thu Mar 7 09:02:15 PST 2013


Perfect! Thanks Steve.

On 08/03/2013, at 3:15, steve.x.northover at oracle.com wrote:

> Here is a link that describes the current architecture: http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm
> 
> Steve
> 
> On 06/03/2013 6:45 PM, John C. Turnbull wrote:
>> Is there a document/link that describes in some detail the threading architecture of JavaFX along with things such as defining the "pulse" and the rendering pipeline?
>> 
>> Thanks,
>> 
>> -jct
>> 
>> -----Original Message-----
>> From: openjfx-dev-bounces at openjdk.java.net [mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of steve.x.northover at oracle.com
>> Sent: Thursday, 7 March 2013 04:49
>> To: openjfx-dev at openjdk.java.net
>> Subject: JavaFX Threading
>> 
>> Hi all,
>> 
>> One of the great things about JavaFX is that it has a consistent threading model that maps well on to the underlying platforms.  There is a single distinguished GUI-thread that is also the GUI-thread for the window system.  This makes JavaFX GUI behavior consistent and deterministic.  In general, running code in the GUI thread is a good thing for these reasons and others, provided that the code is not long running.  In the case of long running code, JavaFX objects may be created in background threads as long are they are not attached to the scene graph.
>> 
>> JavaFX applications have a life cycle that includes, construction, init(), start() and stop().  The start() method is the most important and runs in the GUI-thread.  The init() method is guaranteed to run in a background thread and is the place where long running creation code can reside.  The start() method will always run after init() has completed.
>> With a preloader, the start() of the preloader runs at the same time as the init() of the application.  The stop() method is also guaranteed to run in the GUI-thread.
>> 
>> What about application construction?
>> 
>> Today, this is unspecified and happens in a background thread.  We are considering moving this to the GUI-thread.  Here is the JIRA that is tracking this work:
>> 
>>      http://javafx-jira.kenai.com/browse/RT-28754
>> 
>> If you are interested, add yourself, please add yourself to it and comment either there or on this list,
>> 
>> Thanks!
>> Steve
>> 
>> 


More information about the openjfx-dev mailing list