Top "Blockingqueue" questions

A queue data structure that that waits (suspends the current thread) for the queue to become non-empty when retrieving an element and for space to become available in the queue when storing an element.

Blocking queue and multi-threaded consumer, how to know when to stop

I have a single thread producer which creates some task objects which are then added into an ArrayBlockingQueue (which is …

java multithreading producer-consumer blockingqueue
ExecutorService vs ThreadPoolExecutor using LinkedBlockingQueue

I am working on a multithreaded project in which I need to spawn multiple threads to measure the end to …

java multithreading executorservice blockingqueue threadpoolexecutor
Are there any concurrent containers in C++11?

In particular, I am looking for a blocking queue. Is there such a thing in C++11? If not, what are …

c++ visual-studio-2010 concurrency c++11 blockingqueue
What is the Difference between ArrayBlockingQueue and LinkedBlockingQueue

What scenarios is it better to use an ArrayBlockingQueue and when is it better to use a LinkedBlockingQueue? If LinkedBlockingQueue …

java blockingqueue blockingcollection
Java BlockingQueue take() vs poll()

When consuming values from a Queue in an infinite loop -- what would be more efficient: 1) Blocking on the Queue …

java concurrency queue blockingqueue
When should I use SynchronousQueue

new SynchronousQueue() new LinkedBlockingQueue(1) What is the difference? When I should use SynchronousQueue against LinkedBlockingQueue with capacity 1?

java concurrency blockingqueue
How to get the ThreadPoolExecutor to increase threads to max before queueing?

I've been frustrated for some time with the default behavior of ThreadPoolExecutor which backs the ExecutorService thread-pools that so many …

java multithreading blockingqueue threadpoolexecutor
How to remove elements from a queue in Java with a loop

I have a data structure like this: BlockingQueue mailbox = new LinkedBlockingQueue(); I'm trying to do this: for(Mail mail: mailbox) { …

java loops blockingqueue
How to block until a BlockingQueue is empty?

I'm looking for a way to block until a BlockingQueue is empty. I know that, in a multithreaded environment, as …

java concurrency blockingqueue
When to prefer LinkedBlockingQueue over ArrayBlockingQueue?

When to prefer LinkedBlockingQueue over ArrayBlockingQueue? Which data structure to use among LinkedBlockingQueue and ArrayBlockingQueue when: You want an efficient …

java multithreading concurrency blockingqueue