Re: Event Dispatching Thread Problem
Lew wrote:
There are also structures in java.util.concurrent and related packages
that might serve in this scenario.
thanasis wrote:
could you please be more specific?
Future, Callable, various Executors, Cyclic Barrier. It's pretty much
impossible for anyone but you to be more specific. Only you know what you're
really trying to accomplish, in context.
Start at
<http://java.sun.com/javase/6/docs/api/java/util/concurrent/package-frame.html>
and read the docs, stopping at the docs for types that look like they might be
useful.
You really need to study up on concurrent programming before you venture forth
into that area. It's not the sort of thing you can do effectively just on
hearing some stranger who doesn't really know your problem domain say, "Use
CyclicBarrier" or "Use an implementation of java.util.concurrent.locks.Lock" -
there are a lot of gotchas and a few hours reading up on the subject will pay
huge dividends. C'mon - it's only a few hours to read, say, /Java Concurrency
in Practice/ by Brian Goetz, et al., or other fine books by the likes of Doug
Lea or Joshua Bloch. Plus if you peruse
<http://java.sun.com/javase/6/docs/api/java/util/concurrent/package-frame.html>
there are legions of articles on concurrent programming and GUI programming
that will help you tremendously.
I don't want to hear, "I don't have time to learn what I'm doing first; I just
want a quick solution to this immediate problem." That's just crazy talk.
--
Lew
Please do not quote sigs, certainly not this one.