shutdown after test

Johan Vos johan.vos at gluonhq.com
Wed Apr 24 15:16:46 UTC 2024


On Wed, Apr 24, 2024 at 3:14 PM Kevin Rushforth <kevin.rushforth at oracle.com>
wrote:

> > There are a number of ways to solve this, e.g.
> > * get rid of the separate shutdown procedure in the system tests.
>
> The utility was added to have a consistent way to shut down the
> platform, so it would seem  a shame to remove it.
>
> > * set Platform.setImplicitExit(false) which will prevent tkExit being
> > called when the last window is gone
>
> I doubt we want to run most systems tests with setImplicitExit(false).
>

I agree. In this case, however, it seems to me that `Util.shutdown` goes
hand in hand with `setImplicitExit(false)`. The `shutdown` method is first
hiding all windows, and then it explicitly invokes Platform.exit(). If
implicitExit was set to true, the latter would be obsolete. If we want to
make sure the shutdown method does what it is intended to do, we should
guarantee that the platform is still running -- hence making sure that it
doesn't exit when there are no windows anymore.
But I might be missing something...

- Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240424/3820d51e/attachment.htm>


More information about the openjfx-dev mailing list