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

java.util.Observable.notifyObservers() locks object's monitor for duration

XMLWordPrintable

    • 1.0.k
    • sparc
    • solaris_2.5
    • Not verified

      The routine java.util.Observable.notifyObservers() is synchronized, so it gains ownership of the object's monitor. It keeps this lock through the duration of the notification, which means in all the observers' update routines. This is not right; it makes things deadlock for no good reason. There's no reason to keep ownership of the monitor.

            djbrown David Brown (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: