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

Provide API for running nested events loops, similar to what modal dialogs do

XMLWordPrintable

    • b112
    • generic
    • generic
    • Verified

      One of the most valuable features of AWT/Swing modal dialogs is about blocking the current (calling) thread until the dialog is hidden/disposed. It's implemented differently for the calling thread be EDT or any other thread:

      1. On EDT, we start a nested message pump so the application doesn't get frozen.
      2. On any other thread, we just wait on AWT TreeLock.

      However, all the code behind this feature is package private, see Dialog.show() for details. Many external developers, as well as internal projects like Swing and Java Plugin, need this functionality: stop the current thread until a certain condition is met - both for EDT and non-EDT threads.

            art Artem Ananiev (Inactive)
            art Artem Ananiev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: