Code example for ThreadPoolExecutor

Methods: setMaximumPoolSize

0
    /** 
     * @param numThreads 
     *            the maximum number of threads that will be started to download images in parallel 
     */ 
    public static void setThreadPoolSize(int numThreads) {
        executor.setMaximumPoolSize(numThreads);
    } 
 
    /** 
     * @param numAttempts 
     *            how often the image loader should retry the image download if network connection 
     *            fails 
     */ 
    public static void setMaxDownloadAttempts(int numAttempts) {
        ImageLoader.numRetries = numAttempts;
    } 
 
    /** 
     * This method must be called before any other method is invoked on this class. Please note that 
     * when using ImageLoader as part of {@link WebImageView} or {@link WebGalleryAdapter}, then 
     * there is no need to call this method, since those classes will already do that for you. This