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

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

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u40
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: