< prev index next >
src/java.desktop/share/classes/sun/awt/image/ImageFetcher.java
Print this page
*** 25,35 ****
package sun.awt.image;
import java.util.Vector;
import sun.awt.AppContext;
- import sun.misc.ManagedLocalsThread;
/**
* An ImageFetcher is a thread used to fetch ImageFetchable objects.
* Once an ImageFetchable object has been fetched, the ImageFetcher
* thread may also be used to animate it if necessary, via the
--- 25,34 ----
*** 40,63 ****
* of ImageFetchables is used to track objects to fetch.
*
* @author Jim Graham
* @author Fred Ecks
*/
! class ImageFetcher extends ManagedLocalsThread {
static final int HIGH_PRIORITY = 8;
static final int LOW_PRIORITY = 3;
static final int ANIM_PRIORITY = 2;
static final int TIMEOUT = 5000; // Time in milliseconds to wait for an
// ImageFetchable to be added to the
// queue before an ImageFetcher dies
/**
* Constructor for ImageFetcher -- only called by add() below.
*/
private ImageFetcher(ThreadGroup threadGroup, int index) {
! super(threadGroup, "Image Fetcher " + index);
setDaemon(true);
}
/**
* Adds an ImageFetchable to the queue of items to fetch. Instantiates
--- 39,69 ----
* of ImageFetchables is used to track objects to fetch.
*
* @author Jim Graham
* @author Fred Ecks
*/
! class ImageFetcher extends Thread {
static final int HIGH_PRIORITY = 8;
static final int LOW_PRIORITY = 3;
static final int ANIM_PRIORITY = 2;
static final int TIMEOUT = 5000; // Time in milliseconds to wait for an
// ImageFetchable to be added to the
// queue before an ImageFetcher dies
/**
+ * We must only call the 5 args super() constructor passing
+ * in "false" to indicate to not inherit locals.
+ */
+ private ImageFetcher() {
+ throw new UnsupportedOperationException("Must erase locals");
+ }
+ /**
* Constructor for ImageFetcher -- only called by add() below.
*/
private ImageFetcher(ThreadGroup threadGroup, int index) {
! super(threadGroup, null, "Image Fetcher " + index, 0, false);
setDaemon(true);
}
/**
* Adds an ImageFetchable to the queue of items to fetch. Instantiates
< prev index next >