From: Dolazy Date: 2008-10-22T06:43:47+09:00 Subject: Re: Threading best practices? > I'm going to out on a limb and assume you're using Swing here.  To keep the > GUI painting properly and new events being processed you have to make sure > the EDT (event dispatch thread) does not block.  So in your event handler > you need to spin off a new thread and return as fast as possible to prevent > "laggyness" in the UI.  This does mean you need some asynchronous way of > getting your response, a queue is probably your best bet here (plus it's > thread safe).  InMonkeybars, we used a library named Foxtrot (Java lib) > that processed GUI redraw events (but not new actions) while an action was > being performed.  For short-lived processes this worked great and prevented > the mess of having to get data back from an asynchronous thread. > > David Koontz > Yeah I started using MonkeyBars. I find it a very interesting project, but complicated to learn (may also since the tutorial videos don't seem to work ;) I'm gonna stick to it though because it combines so much great stuff (Ruby style, Swing power, "neo"-MVC, neat folder structure, deployment, ...)