Producer Consumer buffer...

yeonxhan_88

New Member
Joined
Jun 21, 2023
Messages
2
Reaction score
0
Credits
33
The producer thread should generate random numbers and put them into a shared buffer, while the consumer thread should retrieve numbers from the buffer and print them.. give solution !
 


We don't do homework and demanding a solution is just bad form.
 
Sounds like the OP needs to look at databases.......
 
Kafka is a good solution for this. I recommend creating a cluster with more than 2 brokers to avoid split-brain, use Avro schemas for type checking. Just one zookeeper will do.
 
The producer thread should generate random numbers and put them into a shared buffer, while the consumer thread should retrieve numbers from the buffer and print them.. give solution !
There is not enough information to answer this question. Unless @yeonxhan_88 tells us more, we are unable to help. We do even know the form of the answer that they want. Is it a computer program that you must write? If so which programming language?
 
Not another homework Thread.
t2604.gif
 
Not another homework Thread.
t2604.gif
Where I live, the children are finishing their elementary school year (June 2023). It depends on the school district, but the last day of school was either last week or this week for most children in our area.

How do I know? Some children run amok without supervision while their parents/guardians are elsewhere in the store ignoring what their children are doing. They put the store management in an impossible situation and make ordinary shopping unpleasant for the other customers. Say anything and the parents/guardians will suddenly turn hyper-aggressive towards you. How dare you! It is intimidating. That pattern started up last week, and grew considerably this week. It seems worse than ever this year.

My partner and I have learned not to say anything. We try to be efficient, get what we need, and go.
 

Members online


Top