--- old/src/java.desktop/share/classes/java/awt/doc-files/AWTThreadIssues.html 2017-10-23 13:51:00.000000000 -0700
+++ new/src/java.desktop/share/classes/java/awt/doc-files/AWTThreadIssues.html 2017-10-23 13:51:00.000000000 -0700
@@ -1,5 +1,11 @@
+
+
+
+
+ AWT Threading Issues
+
-
-
-
-
-
-
+
-AWT Threading Issues
+AWT Threading Issues
-
+
Listeners and threads
Unless otherwise noted all AWT listeners are notified on the event
@@ -41,7 +42,7 @@
For example, if a key listeners is added from another key listener, the
newly added listener is only notified on subsequent key events.
-
+
Auto-shutdown
According to
@@ -53,7 +54,7 @@
one of two things happens:
- All the threads that are not daemon threads terminate.
-
- Some thread invokes the
exit
method of class
+ - Some thread invokes the
exit
method of class
Runtime
or class System
, and the exit
operation is permitted by the security manager.
@@ -84,13 +85,15 @@
posted to the EventQueue
can be coalesced) are
dispatched:
- - Sequentially.
-
- That is, it is not permitted that several events from
+
-
+
- Sequentially.
+
- That is, it is not permitted that several events from
this queue are dispatched simultaneously.
- - In the same order as they are enqueued.
-
- That is, if
AWTEvent
A is enqueued
+ -
+
- In the same order as they are enqueued.
+
- That is, if
AWTEvent
A is enqueued
to the EventQueue
before
- AWTEvent
B then event B will not be
+ AWTEvent
B then event B will not be
dispatched before event A.
There is at least one alive non-daemon thread while there is at
@@ -98,7 +101,7 @@
application (see
Component.isDisplayable
).
-The implications of the third restriction are as follows:
+The implications of the third restriction are as follows:
- The JVM will exit if some thread invokes the
exit
method of class Runtime
or class System
@@ -108,8 +111,8 @@
displayable component.
It depends on the implementation if and when the non-daemon helper
-threads are terminated once all components are made undisplayable.
-The implementation-specific details are given below.
+threads are terminated once all components are made undisplayable.
+The implementation-specific details are given below.
Implementation-dependent behavior.
@@ -147,7 +150,7 @@
Note, that while an application following these recommendations will
exit cleanly under normal conditions, it is not guaranteed that it
-will exit cleanly in all cases. Two examples:
+will exit cleanly in all cases. Two examples:
- Other packages can create displayable components for internal
needs and never make them undisplayable. See
@@ -156,7 +159,7 @@
4671025, and
-4465537.
+4465537.
- Both Microsoft Windows and X11 allow an application to send native
events to windows that belong to another application. With this
feature it is possible to write a malicious program that will
@@ -165,10 +168,10 @@
On the other hand, if you require the JVM to continue running even after
the application has made all components undisplayable you should start a
-non-daemon thread that blocks forever.
+non-daemon thread that blocks forever.
- <...>
+ <...>
Runnable r = new Runnable() {
public void run() {
Object o = new Object();
@@ -183,7 +186,7 @@
Thread t = new Thread(r);
t.setDaemon(false);
t.start();
- <...>
+ <...>
The Java™ Virtual Machine Specification