Readers/WritersEqual Priority
public class ReadWriteNoPref
{
public synchronized void startRead()
{
while(writers > 0)
wait();
readers++;
}
public synchronized void endRead()
{
readers--;
notify();
}
//continued
Previous slide
Next slide
Back to first slide
View graphic version