Code example for BlockingQueue

Methods: take

0
		return m_workQueue.peek(); // returns null if queue is empty
	} 
 
	public DefaultWorkItem take() throws WorkException { 
		try { 
			return m_workQueue.take(); // blocks if queue is empty
		} catch (InterruptedException e) {
			Thread.currentThread().interrupt();
			throw new WorkException(e);
		} 
	} 
}