RFR: 8271395: Fixing crash at printing

Kevin Rushforth kcr at openjdk.java.net
Mon Sep 6 13:40:42 UTC 2021


On Mon, 6 Sep 2021 10:33:28 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

> This PR switches the Thread to the QuantumRenderer, in the case the Disposer is called from another Thread - the printing Thread.
> I'm open for better solutions on how to fix this Issue.
> Initially i thought there is also a Race Condition in the resource pool, but a new one is created for the Printing Thread.

I haven't reviewed the approach yet. Presuming the approach is the right one, the implementation will need some refactoring to move the toolkit-specific logic into the toolkit. I'll provide more feedback when I go to review this.

modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumRenderer.java line 57:

> 55:  * Quantum Renderer
> 56:  */
> 57: final public class QuantumRenderer extends ThreadPoolExecutor  {

I am not in favor of making this class public. I would rather add a method to Toolkit, and have the overridden method in QuantumToolkit call the Quantum renderer as needed.

-------------

PR: https://git.openjdk.java.net/jfx/pull/618


More information about the openjfx-dev mailing list