equal
deleted
inserted
replaced
3 <head> |
3 <head> |
4 <meta charset="utf-8"/> |
4 <meta charset="utf-8"/> |
5 <title>AWT Threading Issues</title> |
5 <title>AWT Threading Issues</title> |
6 </head> |
6 </head> |
7 <!-- |
7 <!-- |
8 Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. |
8 Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. |
9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
10 |
10 |
11 This code is free software; you can redistribute it and/or modify it |
11 This code is free software; you can redistribute it and/or modify it |
12 under the terms of the GNU General Public License version 2 only, as |
12 under the terms of the GNU General Public License version 2 only, as |
13 published by the Free Software Foundation. Oracle designates this |
13 published by the Free Software Foundation. Oracle designates this |
28 or visit www.oracle.com if you need additional information or have any |
28 or visit www.oracle.com if you need additional information or have any |
29 questions. |
29 questions. |
30 --> |
30 --> |
31 |
31 |
32 <body> |
32 <body> |
33 |
33 <main role="main"> |
34 <h1>AWT Threading Issues</h1> |
34 <h1>AWT Threading Issues</h1> |
35 |
35 |
36 <a id="ListenersThreads"></a> |
36 <a id="ListenersThreads"></a> |
37 <h2>Listeners and threads</h2> |
37 <h2>Listeners and threads</h2> |
38 |
38 |
119 </h3> |
119 </h3> |
120 |
120 |
121 Prior to 1.4, the helper threads were never terminated. |
121 Prior to 1.4, the helper threads were never terminated. |
122 <p> |
122 <p> |
123 Starting with 1.4, the behavior has changed as a result of the fix for |
123 Starting with 1.4, the behavior has changed as a result of the fix for |
124 <a href="http://bugs.sun.com/view_bug.do?bug_id=4030718"> |
124 <a href="https://bugs.java.com/view_bug.do?bug_id=4030718"> |
125 4030718</a>. With the current implementation, AWT terminates all its |
125 4030718</a>. With the current implementation, AWT terminates all its |
126 helper threads allowing the application to exit cleanly when the |
126 helper threads allowing the application to exit cleanly when the |
127 following three conditions are true: |
127 following three conditions are true: |
128 <ul> |
128 <ul> |
129 <li> There are no displayable AWT or Swing components. |
129 <li> There are no displayable AWT or Swing components. |
152 exit cleanly under normal conditions, it is not guaranteed that it |
152 exit cleanly under normal conditions, it is not guaranteed that it |
153 will exit cleanly in all cases. Two examples: |
153 will exit cleanly in all cases. Two examples: |
154 <ul> |
154 <ul> |
155 <li> Other packages can create displayable components for internal |
155 <li> Other packages can create displayable components for internal |
156 needs and never make them undisplayable. See |
156 needs and never make them undisplayable. See |
157 <a href="http://bugs.sun.com/view_bug.do?bug_id=4515058"> |
157 <a href="https://bugs.java.com/view_bug.do?bug_id=4515058"> |
158 4515058</a>, |
158 4515058</a>, |
159 <a href="http://bugs.sun.com/view_bug.do?bug_id=4671025"> |
159 <a href="https://bugs.java.com/view_bug.do?bug_id=4671025"> |
160 4671025</a>, and |
160 4671025</a>, and |
161 <a href="http://bugs.sun.com/view_bug.do?bug_id=4465537"> |
161 <a href="https://bugs.java.com/view_bug.do?bug_id=4465537"> |
162 4465537</a>. |
162 4465537</a>. |
163 <li> Both Microsoft Windows and X11 allow an application to send native |
163 <li> Both Microsoft Windows and X11 allow an application to send native |
164 events to windows that belong to another application. With this |
164 events to windows that belong to another application. With this |
165 feature it is possible to write a malicious program that will |
165 feature it is possible to write a malicious program that will |
166 continuously send events to all available windows preventing |
166 continuously send events to all available windows preventing |
190 </pre> |
190 </pre> |
191 |
191 |
192 <cite>The Java™ Virtual Machine Specification</cite> |
192 <cite>The Java™ Virtual Machine Specification</cite> |
193 guarantees |
193 guarantees |
194 that the JVM doesn't exit until this thread terminates. |
194 that the JVM doesn't exit until this thread terminates. |
|
195 </main> |
195 </body> |
196 </body> |
196 </html> |
197 </html> |