Skip to content

Instantly share code, notes, and snippets.

View NunoDasNeves's full-sized avatar

Nuno Das Neves NunoDasNeves

View GitHub Profile
@NunoDasNeves
NunoDasNeves / BoundedQueue.java
Created June 17, 2017 00:42
Simple concurrent bounded queue in java with observer pattern (unsw COMP2911 exam revision)
import java.util.concurrent.locks.*;
public class BoundedQueue {
private String[] q;
private int head, tail, size;
private Lock qLock;
private Condition space;
private Condition value;