public static void main(String[] args) {
		final BlockingQueue<Integer> queue = new BlockingQueue<Integer>(10);

		//
		// Add 20 things to the queue
		//
		new Thread() {
			public void run() {
				BlockingQueue.sleep(3);
				for (int i=0; i < 20; ++i) {
					queue.enqueue(new Integer(i));
					System.out.println("Enqueued " + i);
				}
			}
		}.start();
		System.out.println("Started enqueue thread");

		//
		// while at the same time...
		//

		System.out.println("Trying to dequeue - should wait a bit");
		//
		// Pull 20 things off the queue
		//
		for (int i=0; i < 20; ++i) {
			System.out.println("dequeue " + queue.dequeue().toString());
			sleep(1);
		}

	}