BlockingQueue 的四组API

BlockingQueue 的四组API

方式 抛出异常 返回值 阻塞等待 超时等待
插入元素 add(e) offer(e) put(e) offer(e, time, unit)
删除元素 remove() pool() take() poll(time, unit)
检查队首元素 element() peek() - -
原文地址:https://www.cnblogs.com/xiekun96/p/14289854.html