On Sun, Apr 13, 2008 at 3:17 PM, Bob Tarling <[EMAIL PROTECTED]> wrote:
> But in principle, if you want to update the UI from the MDR thread > then it is safer to use invokeLater to push the responsibility to AWT. It's not just safer. It's a requirement of Swing which is clearly documented. Swing is not thread safe and all Swing operations are required to take place on the AWT event thread. > What I'm trying to suggest is a way to isolate where its necessary to > do this in as few places as possible and so have it clear to the > developer where UI and none UI code without having to worry. We can clearly requeue *all* MDR events to the be processed on the AWT event thread rather than only doing Swing related work there. The disadvantages to doing this are that: a) it's extra overhead and b) as we run on more and more multi-core processors, we'll be less able to take advantage of the additional cores, so the program will run proportionally slower. Having said that, correct behavior is more important than performant behavior, if we really have to choose only one. Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
