Anonymous
public java v1 · immutablesynchronized put(something) {while(buffer.isFull()){ wait() }buffer.add(something)notifyAll()}synchronized get(something) {while(buffer.isEmpty()) { wait() }res = buffer.read()notifyAll()return res}synchronized put(something) {while(buffer.isFull()){ wait() }buffer.add(something)notifyAll()}synchronized get(something) {while(buffer.isEmpty()) { wait() }res = buffer.read()notifyAll()return res}