public void waitForConsumers() {
		Object[] threads;
		synchronized(consumers) {
			threads = new ArrayList(consumers.keySet()).toArray();
		}
		for(int i = 0; i < threads.length; i++) {
			Thread thread = (Thread)threads[i];
			if(thread != null && thread.isAlive()) {
				try {
					thread.join();
				}
				catch(InterruptedException e) {
					break;
				}
			}
		}
	}