How is the producer and consumer problem solved by using java's monitor?

I have a thread subclass which represents arrivals at a public office and a thread subclass which represents the caseworkers.

Every time a person is arrived, the person's name is entered. There are 2 entrances for the office where there arrivals can enter their name. There can be no more than 10 persons in the waiting room. If there are more, they must wait until a place is available.

The caseworkers call the names that have been entered. There are 2 caseworkers. Of course, the names can only be called up if...

Read More »

By: StackOverFlow - 5 days ago

Related Posts