public void waitForProducers() {
		Object[] threads;
		synchronized(producers) {
			threads = new ArrayList(producers.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;
				}
			}
		}
	}