On Jun 27, 10:45 pm, Tim Peierls <[email protected]> wrote: > On Fri, Jun 24, 2011 at 3:03 AM, Aekold <[email protected]> wrote: > > SwingWorker is supposed to be constructed in EDT too, > > Really? I can't find anything that supports that, and a sentence in the > javadoc<http://download.oracle.com/javase/6/docs/api/javax/swing/SwingWorker....>, > "Often, the Current thread is the Event Dispatch Thread," implies that > sometimes it isn't.
Yes, that's not a rule of course. I mean that official SwingWorker usage guide http://download.oracle.com/javase/tutorial/uiswing/concurrency/interim.html is showing this example http://download.oracle.com/javase/tutorial/uiswing/examples/concurrency/FlipperProject/src/concurrency/Flipper.java so it's obvious that SwingWorker construction in EDT is not a problem and is not something to avoid by crippling structure of your application. Though it's obvious it's construction should not be heavy, because main purpose of SwingWorker is to return control back to EDT, so all heavy operations you can move into doInBackground(). -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
