-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
Consider eliminating the JavaFX-Launcher Thread, and instead launch the FX toolkit / application thread directly from the caller.
Gerard raised the question:
> Does the start-up process really need the 2 threads #1 and #2?
This might not be necessary. Having the JavaFX Launcher thread gives us the ability to set our own thread group. We don't use that capability, though, so we could consider retiring the thread and calling from the user's main thread. I would need to explore whether there are any issues with sandboxed application (I don't think so), or other concerns (such as what happens if the calling thread is a daemon thread, what happens if the user interrupts the main thread, etc). I 'm not sure this is worth pursuing, though. Both the Java main thread and the JavaFX-Launcher thread spend the entire life of the application asleep.
Gerard later pointed out:
> That might not matter much on Desktop platforms, but how expensive is a thread on a mobile platform, especially if we end up not using it?
which is a valid point, so I am filing this issue to consider retiring the JavaFX-Launcher thread.
Gerard raised the question:
> Does the start-up process really need the 2 threads #1 and #2?
This might not be necessary. Having the JavaFX Launcher thread gives us the ability to set our own thread group. We don't use that capability, though, so we could consider retiring the thread and calling from the user's main thread. I would need to explore whether there are any issues with sandboxed application (I don't think so), or other concerns (such as what happens if the calling thread is a daemon thread, what happens if the user interrupts the main thread, etc). I 'm not sure this is worth pursuing, though. Both the Java main thread and the JavaFX-Launcher thread spend the entire life of the application asleep.
Gerard later pointed out:
> That might not matter much on Desktop platforms, but how expensive is a thread on a mobile platform, especially if we end up not using it?
which is a valid point, so I am filing this issue to consider retiring the JavaFX-Launcher thread.
- relates to
-
JDK-8124368 Problems with Application static objects and pipeline initialization
- Resolved