how Producer thread should continuously generate data and run infinitely and put into shared Queue and consumer continuously consume data object from shared queue in java
Asked
Active
Viewed 31 times
0
-
Producer thread should not sleep and keep on generating data set and put into shared queue. Parallely consumer has to consume data. here when consumer is accessing data it has to access whole object (contain data) and process it. Please guide me – jaswinderahuja Mar 13 '16 at 14:06
-
yes, with infinite loop. – jaswinderahuja Mar 13 '16 at 14:08
-
Try [this](https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem) – Guy Mar 13 '16 at 14:09
-
1Are you talking to yourself? – user2004685 Mar 13 '16 at 14:09
-
What have you tried, and what are you having trouble with? You appear to understand what is required, so I suggest you go ahead and do it. – Peter Lawrey Mar 13 '16 at 14:16