Code example for ArrayBlockingQueue

Methods: take

0
		} 
 
		public void run() 
		{ 
			try { 
				BitmapWithIndex b = loader.getBitmapQueue().take();
				if (DBG) {
					Log.d(LCAT, "set image: "+b.index);
				} 
				setImage(b.bitmap);
				fireChange(b.index);
			} catch (InterruptedException e) {
				e.printStackTrace();
			} 
		} 
	} 
 
	public void start() 
	{ 
		if (!proxy.getTiContext().isUIThread()) { 
			proxy.getTiContext().getActivity().runOnUiThread(new Runnable() {