Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8098096

[Quantum] Cleanup renderLock usage to call QuantumToolkit runWith/WithoutRenderLock

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u40
    • 8u40
    • javafx

      The fix for RT-38289 added a new runWithoutRenderLock static utility method in QuantumToolkit that takes a Supplier (lambda) and checks whether the renderlock is held; if it is, it releases it prior to calling the supplier and reacquires it afterwords. There is one more place where this method could be used.

      Additionally, the following pattern appears in several places:

          lock
          try {
            code that runs with the lock held
          } finally {
              release lock
          }

      I propose to add a new runWithRenderLock method to centralize the code that actually handles the lock.

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: