Java.util.concurrent Queues: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
{{External|https://docs.oracle.com/javase/10/docs/api/java/util/concurrent/BlockingQueue.html}} | {{External|https://docs.oracle.com/javase/10/docs/api/java/util/concurrent/BlockingQueue.html}} | ||
<tt>java.util.concurrent.BlockingQueue<E></tt> is a <tt>java.util.Queue</tt> that has operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element. When configured with a fixed size (example <tt>[[#ArrayBlockingQueue|ArrayBlockingQueue]]</tt>, it can be used as a memory sprawl control mechanisms, providing memory-safe separation between threads. | <tt>java.util.concurrent.BlockingQueue<E></tt> is a <tt>java.util.Queue</tt> that has operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element. When configured with a fixed size (example <tt>[[#ArrayBlockingQueue|ArrayBlockingQueue]]</tt>), it can be used as a memory sprawl control mechanisms, providing memory-safe separation between threads. | ||
It has the following implementations: | It has the following implementations: |
Revision as of 17:16, 23 March 2018
Internal
Overview
Blocking Queue
java.util.concurrent.BlockingQueue<E> is a java.util.Queue that has operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element. When configured with a fixed size (example ArrayBlockingQueue), it can be used as a memory sprawl control mechanisms, providing memory-safe separation between threads.
It has the following implementations: