Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
java の BlockingQueue に putAll メソッドがない理由を知っている人はいますか? そのような方法に問題はありますか?BlockingQueue を完全に再実装することなく、この問題を回避する良い方法はありますか?
for (Item item : items) { queue.put(item); }
3 行、ブロック キューを完全に再実装しているかどうかはわかりません。
スレッドが読み取りを待機している場合に備えて、1 つずつ配置する必要があると思いますが、すべての読み取りが完了するのを待っているわけではありません。