What is the famous producer consumer problem?
Answers
Answered by
0
In Simple term we can say, when two Process trying to access same(commonly shared) resource at the same time and one failed to do its operation because another process is using that resource.
Solution
We can solve this problem using synchronized keyword. synchronized takes care for accessing List<Integer>, while one thread is accessing the List<Integer> another thread has to wait until first thread finishes its work.
Solution
We can solve this problem using synchronized keyword. synchronized takes care for accessing List<Integer>, while one thread is accessing the List<Integer> another thread has to wait until first thread finishes its work.
Attachments:
Similar questions
Math,
7 months ago
Social Sciences,
7 months ago
Science,
1 year ago
Math,
1 year ago
Math,
1 year ago