Tagged Questions

The Producer-Consumer Problem (also known as the bounded-buffer problem) is a classical example of a multi-process synchronization problem. The problem describes two processes, the producer and the consumer, who share a common, fixed-size buffer used as a queue.

Im reading the pdf tib_ems_user_guide.pdf to prepare for an upcoming project (a project on TIBCO ESB). I got no further than the intro when I ran into what I perceived as a contradiction. I realized ...

When using BlockingQueue to consume data that is produced what is the most efficient method for waiting for the data to appear?
Scenario:
Step 1) The data list will be a data store where timestamps ...

Could anyone point out why this code can cause dead-lock?
It is a single producer, multiple consumer problem. The producer have 8 buffers. Here it has 4 consumers. Each consumer will have two buffers. ...

I am trying to re-write the classic producer-consumer algorithm using Windows libraries in C++. The snipped below was copied from a Java sample. Anyone know the equivalent of lock.notify and lock.wait ...

I have a XML file with a sequence of nodes. Each node represents an element that I need to parse and add in a sorted list (the order must be the same of the nodes found in the file).
At the moment I ...

Could you please help with advice about testing the produce-consumer classes(BlockingQueue and Reentrant implementations) in Java. What framework is the best to use?
As I understand it is needed to ...

I would like to make the statistics routine conditional so that it only runs on certain cases otherwise it will waste cycles half the time. Right now I have one go routine act as a producer to feed ...

I am learning Pthread programming. Here is the question i got at the end of my assignment:
I want to copy each bytes in the source file to a new .txt file by using producer-consumerproblem.
Here is ...

I have a dispatcher thread and a listener thread. When I dispatch a command, I want to wait for response before I send follow up command. Moreover I need to examine the respond before I can proceed ...

Hoping someone can give some advice regarding the Producer/Consumer Pattern – in particular on how best to achieve a Queue/BlockingCollection which is COMMON to all producers/consumer class instances?
...

How Can I develop a producer/ consumer pattern which is thread safe?
in my case, the producer runs in a thread and the consumer runs on another thread.
Is std::deque is safe for this purpose?
can I ...

I use redis list as a queue, i also have a consumer program take the stuff from redis. I want to have the consumer in ruby take stuff from redis as long as redis is not empty. Do you know how could i ...

Usecase :
its a producer consumer pattern where order (FIFO) is to be maintained. As of now there is single producer and a single consumer to process data in sequential manner to maintain order, but ...

I am trying to implement a producer consumer model to separate the analysis and recording the data (collected from analysis) part of my pin tool. Going through the PIN thread API, I could not find any ...

I am making a simple producer consumer problem. The waiter is the producer and the chef is the consumer. I have implemented it such that the Chef thread waits till Waiter notifies it of an incoming ...

I have to write a POSIX threads and semaphores based implementation of Producers and Consumers Problem for academical purposes. To check if the implementation is valid I sum all the 'goods' which are ...

Is there a specific type of Queue that is "closable", and is suitable for when there are multiple producers, consumers, and the data comes from a stream (so its not known when it will end)?
I've been ...

I have written code to implement producer consumer problem using wait and notify. It is working fine but the problem is consumer thread is running in an infinite loop and keeps on waiting even after ...

I want to use an async producer/consumer queue (AsyncEx lib) to send messages one at a time over a bus. Right now I achieve this simply by async blocking. It's working fine, but I have no control over ...

I am new to Active MQ and JMS, I have written code like that, when i run MYProducer it run successfully, but I am not seeing this message count in Active MQ admin page but it is not throwing me any ...

I have a tcp listener which listens and writes data from the server. I used a BlockingCollection to store data. Here I don't know when the file ends. So, my filestream is always open.
Part of my code ...

I have a hashmap with a queue object and I want to peek different objects in the different queue in the order they are located in queue each time i peek an object, typically consumer-producer problem;
...