so I'm working on this report, and the last assignment is to create a producer/consumer model with n
Producers and one Consumer, the trick is that i have to make it work with notify()
instead of notifyAll()
in the put and get methods.
I figure just leaving it as is in the get method isn't a problem, since there's only the one consumer, but I'm having trouble figuring out how to make sure the notify()
in the put method only calls the consumer thread, instead of waking up another producer and causing deadlock.