harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Hawtin <tackl...@tackline.plus.com>
Subject Re: [-SPAM-] RE: [-SPAM-] RE: [classlib][swing] an odd code in swing
Date Thu, 07 Dec 2006 15:11:13 GMT
Ivanov, Alexey A wrote:
>> From: Nathan Beyer [mailto:nbeyer@gmail.com]
>> Do you know of any specific examples of code that's required to be
> thread
>> safe?
> Yes, I do. For example: javax.swing.text.AbstractDocument.remove,
> .insertString, .createPosition;
> javax.swing.text.JTextComponent.replaceSelection, .setText.

Supposedly repaint, revalidate and invalidate are intended to be 

EventListenerList claims to provide "a degree of MT safety", which is 
utterly meaningless.

> [1] http://java.sun.com/products/jfc/swingdoc-archive/threads.html

I suspect that section of the tutorial has been replaced since the 
references to it in the RI API docs were written...

There is a key point about statics. Applets running from different web 
sites should have different event threads. Therefore, statics in Swing 
(and elsewhere) need to be treated with extreme caution.


Tom Hawtin

View raw message