RE: VisAD threading problems [potential sol'n]

  • To: Ian Graham <ian@xxxxxxxxxx>
  • Subject: RE: VisAD threading problems [potential sol'n]
  • From: Bill Hibbard <billh@xxxxxxxxxxxxx>
  • Date: Mon, 23 Jun 2003 19:13:19 -0500 (CDT)
Hi Ian,

> I have a quick fix that seems to resolve my problems.  It needs a closer
> look from someone who knows VisAD better, because I don't really understand
> the reason for the conditions that are checked in the code I've removed.
> Basically I've just commented out code that was explicitly rerendering, and
> replaced it with a simple repaint() call.

I figured the same thing out a couple hours ago, but was home
and waiting to reply until tommrrow AM when I'm back in the
office. I'll try to do a release of this fix to the VisAD ftp
server tommorrow.

Thanks for your Test73.java program which really helped in
finding the fix.

> I would, however, consider tidying up a bit more:  it's really alarming to
> see a Swing component that implements Runnable, given that Swing is
> single-threaded, so at the very least I would instead create an inner class
> to implement the rendering thread(even anonymously would be fine if you name
> clearly enough the variable you assign it to).

I don't think an extension of JPanel that implements Runnable
violates any Threading rules as long as it doesn't invoke the
JPanel methods that must be invoked from the UI Thread.

Cheers,
Bill


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: