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

Need EventQueue constructor that doesn't allow creating EventDispatchThread

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: dsR10051 Date: 11/21/2000



      The class java.awt.EventQueue encapsulates asynchronous event dispatch machinery
      which extracts events from the queue and dispatches them. In the JDK this
      machinery is implemented by java.awt.EventDispatchTread class that
      is inaccessible for developer. Besides, the behavior of this machinery is
      implementation-dependent.

      The JCK team needs to turn off this machinery, in order to write correct
      tests for the EventQueue class. The following problems are blocking
      us from writing the JCK tests:

      1. EventDispatchThread class dispatches the events almost immediately, so
         if we post event to the queue we can't check its existence in queue.
         The methods getNextEvent, peekEvent may return no event, because it
         has been dispatched already.

      2. The tests create many queues, thus many treads are created when we run test
         suite in single jvm mode. We need to interrupt this threads to avoid memory
         leaks. It is very important for JCK.

      So, the tests should know how to interrupt the EventDispatchThread or create the
      EventQueue whithout dispatch thread.

      Indeedly, the new EventQueue constructor that doesn't allow creating
      EventDispatchThread when creating/using the instance of EventQueue is the
      solution for problems above.

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

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sdasunw Sda Sda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: