Hi there,
I have script which loads a country and then and then zooms in on an area (defined by a boundingbox) and If necessary changes the size of the display using the command:
activeDisplay().setDimensions(0,0, iWidth, IHeight);
The problem is that after I have called the above method a few times the threads connnected with the old display seem to hang around - and after say 15 calls the number of domant threads is ~ 10*15:
I have created a simple script that illustrates the problem. All you need to to specify a bundle and a log file.
You can also watch the thread number mount up using jconsole.
...Henry
number of Threads
number of Threads
- Attachments
-
- support.py
- (794 Bytes) Downloaded 330 times
Re: number of Threads
Hello Henry,
Thanks for bringing this to our attention (and providing an example script!). I'm looking into it now.
Jon
Thanks for bringing this to our attention (and providing an example script!). I'm looking into it now.
Jon
Re: number of Threads
HI Jon,
did you manage to replicate the problem ?
I have seen the problem on my local machine and on our sever
...Henry
did you manage to replicate the problem ?
I have seen the problem on my local machine and on our sever
...Henry
Code: Select all
import os
import logging
import sys
import time
homeDir=os.getenv("HOME")
print homeDir
def numThreads():
numT=java.lang.management.ManagementFactory.getThreadMXBean().getThreadCount();
return numT
logging.basicConfig(filename="/home/hmb/Documents/SURFTWEETER/support.log", filemode='w', level=logging.DEBUG);
logging.debug("/**** log start ****/");
# Open the bundle and change the size of the display frame to 640 by 480
loadBundle("/home/hmb/Documents/SURFTWEETER/bundles/auswaveG2.mcv",None,500,400)
# pause()
for sizeY in range(400,500,10):
logging.debug("total number of Threads=%d\n"% numThreads() );
activeDisplay().setDimensions(0,0,500,(sizeY));
logging.debug("Final number of Threads=%d\n"% numThreads() );
logging.debug("/**** log end ****/");
Re: number of Threads
As Jon wrote in response to your other post, we've written this up as Inquiry 1679: http://mcidas.ssec.wisc.edu/inquiry-v/?inquiry=1679