Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Thread Shutdown

Hi, I am new to visad but am enjoying using it, except for a lack of
understanding in the thread model.

I am doing some offscreen image creation using DisplayImpl.getImage(true),
have added data for a number of FlatFields.  The images come out great.
I should point out that I am using the same DisplayImpls over and over for
all images.  I'm using just 2D rendering.

However, when I want to shutdown the visad part of my app, sometimes it
hangs.  I'm doing this:

displayImplA.destroy();
displayImplB.destroy();
ActionImpl.stopThreadPool();

sometimes these three lines return OK.  Sometimes I get an exception
mentioning a task queue (??) and sometimes it just hangs.  This is bad,
since I run this job as a cron and the app must exit after it has done.

Any help very gratefully appreciated.  I apologise of this is  FAQ, I
couldn't locate it.  On  a broader note, how many threads should I expect
if using two DisplayImpls.

Stuart

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690