Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Image capture -- renegade threads

Hello visad-list

I have another question for you regarding offscreen image rendering.

I've set a up a simple class to capture my images, but the process never
completes -- my program never exits.  It seems to me that there must be
some thread buried deep inside VisAD that isn't finishing.


Here's the general outline of my code:

public class ImageMaker{

        public void main( String[] args ){
                captureImages();
                return;
        }

        private void captureImages(){
                // create DisplayImpl
                // add data to DisplayImpl
                // call thread to capture images
                Thread thread = new ImageCapturer( DisplayImpl disp );
                thread.start();
                System.out.println( "All Done!" );
                return;
        }

        class ImageCapturer extends Thread{

                // constructor

                // run
                public void run(){
                        // get the image
                        // write it to file
                        System.out.println( "Thread Done!" );
                }
        }
}


I run the code with
> java ImageMaker
And see...
All Done!
Thread Done!

But the prompt never comes back.  What is still running that won't let my
program exit?


Thanks for the help.

Leah


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