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.
キューが空でない場合、そこから取得するブロックが必要な理由がわかりません。
ところで。その引用はQueue docからのものです。
これは、別のスレッドemptyへの呼び出しと次の別の呼び出しの間にget、キューから要素を取り出して空にすることが保証されていないことを意味します。したがって、次の呼び出しgetがブロックされる可能性があります。
empty
get