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

java.awt.EventQueue.isDispatchThread() specification is not precise

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Not verified

      Description



      Name: mgC56079 Date: 04/24/98



      Javadoc says:

          /**
           * Returns true if the calling thread is this EventQueue's
           * dispatch thread. Use this call the ensure that a given
           * task is being executed (or not being) on the current
           * EventDispatchThread.
           *
           * @return true if running on this EventQueue's dispatch thread.
           */
          public static boolean isDispatchThread() {
              return (Thread.currentThread() instanceof EventDispatchThread);
          }


      This is a static method so there is no _this_ EventQueue's dispatch thread.
      This method actually returns true if current thread is _any_ EventQueue's
      dispatch thread (each instance of EventQueue has separate dispatch thread).

      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            dgreensunw Dale Green (Inactive)
            Reporter:
            mgorshen Mikhail Gorshenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: