BlockingQueue深入分析

一、概述: BlockingQueue作爲線程容器,可以爲線程同步提供有力的保障。   二、BlockingQueue定義的常用方法 1.BlockingQueue定義的常用方法如下:   拋出異常 特殊值 阻塞 超時 插入 add(e) offer(e) put(e) offer(e, time, unit) 移除 remove() poll() take() poll(time, unit)
相關文章
相關標籤/搜索