RFR: 8248381: Create a daemon thread for MonocleTimer
Kevin Rushforth
kcr at openjdk.java.net
Sat Jun 27 19:39:19 UTC 2020
On Sat, 27 Jun 2020 16:25:24 GMT, John Neffenger <github.com+1413266+jgneff at openjdk.org> wrote:
>> On second thought, this seems more like a workaround than a fix. Maybe it would be better to shutdown the timer to shut
>> it down in an orderly fashion with the FX runtime is terminated. The `QuantumToolkit::exit` method already calls
>> `PulseTimer::stop` so that seems a likely place to stop the timer.
>
>> On second thought, this seems more like a workaround than a fix.
>
> This change just restores the thread daemon status to the way it was before in JavaFX 14, where `true` is passed to the
> `Timer` constructor for "isDaemon - true if the associated thread should run as a daemon."
> if (timer == null) {
> timer = new java.util.Timer(true);
> }
>
> I tried setting `task.cancel(true)` instead of `false` in the `_stop` method, but that didn't stop the non-daemon
> thread.
OK, that seems fine then. I'll take a closer look and then finish my review.
-------------
PR: https://git.openjdk.java.net/jfx/pull/256
More information about the openjfx-dev
mailing list