NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

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: