The Swing runtime should have assertions in *all* cases where it needs 
to be executed in the event thread.

This way you could just turn on the assertions and know when you loused up.

As it is now there are various hacks that *others* have used to add 
checking to Swing from outside, but these are clearly hacks.  No one but 
the Swing authors can really know and maintain all the checks that need 
to be done here.  It is rather inexcusable that they have not added 
these to Swing yet.  The need for this has been crystal clear for years.

--
Jess Holle

Ben Schulz wrote:
>> Concurrency is one of the more simple, academic issues
>>     
>
> What are you doing? Do you wanna.. tempt the wrath of the whatever
> from high atop the thing? :D
>
> Concurrency is many things, simple ain't one of them. That's the very
> reason academia is *still* (60 years(?) later) trying to solve it.
>
> Anyways, I sort of see your point. For the average desktop app it does
> not seem like much of an issue. Except.. have you ever used AWT or
> Swing? Try to find a Swing sample out there that does not initialize
> the JFrame on the main thread. That's unsafe code[1], but nobody
> notices or cares. Ideally the compiler would tell you, but the runtime
> telling you would be good enough for me. (Incidentally, the runtime
> will tell you with the right aspects. [2])
>
> With kind regards
> Ben
>
> [1] http://java.sun.com/developer/JDCTechTips/2005/tt0419.html#1
> [2] 
> http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to