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

Eliminate nested locks

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • hs23
    • 8-pool
    • hotspot
    • None
    • b10
    • generic
    • generic
    • Verified

        Eliminated nested locks of the same object:

            synchronized (reader) { // we synchronize on reader
            if (reader.getCount() > 0) { // calling synchronized method getCount() while already holding the lock
               reader.incrementReserveCount(1);
            }

              kvn Vladimir Kozlov
              kvn Vladimir Kozlov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: