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

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

    XMLWordPrintable

Details

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

    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

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported: