Re: Image capture -- renegade threads

Hi Leah,

There are one or more Threads inside a DisplayImpl. You
should be able to stop them with a call to the destroy()
method of each DisplayImpl. Or just call System.exit(0).

Good luck,
Bill

On Fri, 1 Aug 2003, Leah Heiss wrote:

> 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: