Code example for LinkedBlockingQueue

0
			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 {
		DebugLog.d(TAG, "Start loading bitmap: "+mBitmapSource.getUri(mType));
		return BitmapLoader.loadFromDiskOrNetwork(mBitmapSource, mType, mConfig, mVolatility);
	}