Code example for ThreadPoolExecutor

0
			} 
			return sSingleThreadExecutor;
		} else { 
			// Else use a thread pool executor 
			if (sBitmapExecutor == null) {
				sBitmapExecutor = new ThreadPoolExecutor(
						DEFAULT_CORE_POOL_SIZE,
						MAXIMUM_POOL_SIZE,
						KEEP_ALIVE, TimeUnit.MILLISECONDS,
						new LinkedBlockingQueue<Runnable>(), 
						new BitmapLoaderThreadFactory("multiple threads")); 
			} 
			return sBitmapExecutor;
		} 
	} 
	 
	//---------------------------------------------- 
	// BackgroundTask implementation 
 
	@Override 
	protected Bitmap doWorkInBackground() throws Exception {