Code example for BlockingQueue

Methods: offer

0
	private final BlockingQueue<Item> queue; 
	 
	Producer(BlockingQueue<Item> q) { queue = q; } 
	 
	public void run() { 
			queue.offer(new Item()); 
	} 
} 
 
class Item {}