/** * 阻塞队列的实现 * BlockingQueue是 juc中解决生产者和消费者问题的最有用的一个类 -》 皆是线程安全的类 */ public interface BlockingQueue<T> { /** * 插入数据的接口 */ void put(T element) throws InterruptedException; /** * 获取数据的接口 */ T take() throws InterruptedException; } /** * 本文需保证没有第三线程参与情况下 */…