[concurrency-interest] SwingWorker example (was Concurrency Utilities in Practice)

Tim Peierls tim@peierls.net
Mon, 24 Nov 2003 09:59:05 -0500


Tim Peierls wrote:
> > The idea is to present real programs that make essential use of JSR-166 tools. 
> > ... We have two such programs in mind, a SwingWorker-like utility ...

David J. Biesack wrote:
> Is this based on or similar to FoxTrot, which was presented at JavaOne 2003?

No, our idea was simply that, since Joe had already made good use of dl.u.c 
in a SwingWorker implementation, we could turn this into a quick example of 
using j.u.c in a real program.

I haven't looked hard at Foxtrot -- Joe may have -- but I'll take a closer look.

I should say here that while responsiveness of Swing apps is clearly a great
application of the concurrency utilities, it isn't the only one. Does anyone
have any more-or-less real examples that make use of any of the following:

    Semaphore
    CountDownLatch (especially with count > 1)
    CyclicBarrier
    concurrent collections (especially PriorityBlockingQueue)
    j.u.c.atomics
    j.u.c.locks (especially Condition)

--tim