let's play TDD, tackles closures in java

Brian Goetz brian.goetz at oracle.com
Mon Dec 20 03:53:01 PST 2010


Swing is indeed a single-threaded *subsystem* (if you do it right).  But there are a number of methods in the Swing APIs that are designed to be, and usually are, called from other threads.  All Swing applications are multi-threaded because the main thread is not the EDT.  

On Dec 20, 2010, at 6:37 AM, Jesse Sightler wrote:

> Actually swing is inherently single threaded.
> 
> On Dec 20, 2010 5:56 AM, "Brian Goetz" <brian.goetz at oracle.com> wrote:
> >>> You can as well use AtomicBoolean, which has an extra benefit of having
> >>> defined behaviour in multithreaded case.
> >>> 
> >> 
> >> And the extra disadvantage of having a much higher performance overhead in
> >> the single-threaded case.
> >> 
> > 
> > The example he gave, which was Swing-based, was inherently multi-threaded.
> > 
> > 



More information about the lambda-dev mailing list