Questions about Platform.runLater() and Application.start()
Stephen F Northover
steve.x.northover at oracle.com
Mon Nov 3 14:58:47 UTC 2014
Hi there,
If you en-queue a runnable in start() it will not run until start()
completes unless you open a dialog in start() that waits for a result
before proceeding. In that case, your runnable will run. You are
correct about runnables and input events being part of the input queue
for the application thread. Threads are not interrupted to run code.
Steve
On 2014-11-03, 8:49 AM, ngalarneau at ABINITIO.COM wrote:
> Hello,
>
> Is there documentation that describes somewhere how Platform.runLater() &
> Application.start() interact?
>
> My impression is that (roughly speaking):
> - there is an EventQueue (to use the Swing terminology).
> - the EventQueue holds both UI events (like mouse click) as well as the
> Runnables enqueued by runLater().
> - the first (?) event put in the EventQueue is a Runnable representing
> Application.start().
>
>
> My impression is, therefore, that any Runnables enqueued during
> Application.start() won't be run until after start() completes.
> This behavior is the same as one runLater() not interrupting another
> runLater().
>
>
> Is this sort of stuff documented somewhere?
>
> Is this the right way to think about this part of the system? (even if the
> implementation is different)
>
> Are there other special things to be aware of about Application.start()?
>
>
> Thanks,
>
> Neil
>
> P.S. I am using javafx.concurrent.Service & Task and am hitting some
> issues.
>
>
>
> NOTICE from Ab Initio: This email (including any attachments) may contain
> information that is subject to confidentiality obligations or is legally
> privileged, and sender does not waive confidentiality or privilege. If
> received in error, please notify the sender, delete this email, and make
> no further use, disclosure, or distribution.
More information about the openjfx-dev
mailing list