Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-20 Thread Kevin Rushforth
On Thu, 19 Sep 2024 14:03:45 GMT, Kevin Rushforth wrote: > This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs > when called from the QuantumToolkit shutdown hook. A shutdown hook should > never run indefinitely, so the fix is to call dispose from a background > threa

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-20 Thread Kevin Rushforth
On Fri, 20 Sep 2024 13:10:11 GMT, Johan Vos wrote: > Regardless of this fix, it would still be good to have a fix for > [JDK-8238505](https://bugs.openjdk.org/browse/JDK-8238505) (although that is > likely less urgent now that the CI blocking is tackled) -- and there might be > other issues th

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-20 Thread Andy Goryachev
On Thu, 19 Sep 2024 14:03:45 GMT, Kevin Rushforth wrote: > This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs > when called from the QuantumToolkit shutdown hook. A shutdown hook should > never run indefinitely, so the fix is to call dispose from a background > threa

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-20 Thread Johan Vos
On Thu, 19 Sep 2024 14:03:45 GMT, Kevin Rushforth wrote: > This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs > when called from the QuantumToolkit shutdown hook. A shutdown hook should > never run indefinitely, so the fix is to call dispose from a background > threa

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-20 Thread Kevin Rushforth
On Fri, 20 Sep 2024 06:08:52 GMT, Ambarish Rapte wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java >> line 276: >> >>> 274: try { >>> 275: if (!disposeLatch.await(5, TimeUnit.SECONDS)) { >>> 276:

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-20 Thread Kevin Rushforth
On Thu, 19 Sep 2024 23:15:34 GMT, Andy Goryachev wrote: >> This PR fixes a hang on exit which can happen if QuantumToolkit.dispose >> hangs when called from the QuantumToolkit shutdown hook. A shutdown hook >> should never run indefinitely, so the fix is to call dispose from a >> background th

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-19 Thread Johan Vos
On Thu, 19 Sep 2024 14:03:45 GMT, Kevin Rushforth wrote: > This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs > when called from the QuantumToolkit shutdown hook. A shutdown hook should > never run indefinitely, so the fix is to call dispose from a background > threa

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-19 Thread Ambarish Rapte
On Thu, 19 Sep 2024 23:17:31 GMT, Andy Goryachev wrote: >> This PR fixes a hang on exit which can happen if QuantumToolkit.dispose >> hangs when called from the QuantumToolkit shutdown hook. A shutdown hook >> should never run indefinitely, so the fix is to call dispose from a >> background th

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-19 Thread Ambarish Rapte
On Thu, 19 Sep 2024 14:03:45 GMT, Kevin Rushforth wrote: > This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs > when called from the QuantumToolkit shutdown hook. A shutdown hook should > never run indefinitely, so the fix is to call dispose from a background > threa

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-19 Thread Andy Goryachev
On Thu, 19 Sep 2024 14:03:45 GMT, Kevin Rushforth wrote: > This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs > when called from the QuantumToolkit shutdown hook. A shutdown hook should > never run indefinitely, so the fix is to call dispose from a background > threa

Re: RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-19 Thread Kevin Rushforth
On Thu, 19 Sep 2024 14:03:45 GMT, Kevin Rushforth wrote: > This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs > when called from the QuantumToolkit shutdown hook. A shutdown hook should > never run indefinitely, so the fix is to call dispose from a background > threa

RFR: 8340405: JavaFX shutdown hook can hang preventing app from exiting

2024-09-19 Thread Kevin Rushforth
This PR fixes a hang on exit which can happen if QuantumToolkit.dispose hangs when called from the QuantumToolkit shutdown hook. A shutdown hook should never run indefinitely, so the fix is to call dispose from a background thread and wait for up to 5 seconds for it to finish normally, and then