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

AWT Daemon Thread never finishes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1, 1.1.6, 1.2.0
    • client-libs
    • generic, x86
    • generic, windows_95



      Name: dbT83986 Date: 12/10/98


      This is a major problem with the current versions
      of the JDK 1.1.7A and 1.2.x betas, and seriously affects
      100% pure running ability.

      The problem is that once used, the AWT Thread never
      terminates, causing the users to have to use System.exit()
      to stop a program from running. From the 100% Pure site,
      this is A BAD THING.

      The AWT Thread should be marked as a Daemon once all
      the event queue has been processed and there are no more
      visible windows. If any further events are generated,
      then they will be inserted into the queue, forcing the
      AWT Thread to continue running even if another thread finishes.

      Example:

      public class ThisBuggersUpTheAWTAndTheWholeConceptOfPureCode {
        public static void main(String args[]) {
          Frame f = new Frame("Bugger this for a larf");
          f.setSize(200,200);
          f.setLocation(0,0);
          f.setVisible(true);
          f.dispose();
          // you'd have thought you woudln't need the next line
          // System.exit(0);
        }
      }
      This just hangs the system, and the user must Ctrl+C
      to break out of it.
      (Review ID: 42138)
      ======================================================================

            dmendenhsunw David Mendenhall (Inactive)
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: