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

SwingWorker state transition issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 6
    • client-libs

      The spec for javax.swing.SwingWorker state:
      ----
      After the doInBackground method is finished the done method is executed. Then SwingWorker notifies any PropertyChangeListeners about the state property change to StateValue.DONE.
      ----

      It is unclear from the spec what state of the swing worker is when the done method is running. In other words there are no specified which thread set the state to DONE.

      If such thread is event dispatching thread then the state of the swing worker is STARTED until the done method is finished. Otherwise the state of the swing worker when the done method is running is not specified (either STARTED or DONE depending on thread timing).

      Is there possibility to have the state STARTED (not DONE) after the get method is finished due to thread races?

            idk Igor Kushnirskiy (Inactive)
            ydanilev Yury Danilevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: