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)
======================================================================