public synchronized T get() throws InterruptedException
    {
        T result;

        // Queue is empty - wait
        while(mQueue.isEmpty())
            wait();
        result = mQueue.remove();

        // Now queue not full
        if(mQueue.size()+1 == mCapacity)
            notifyAll();

        return result;
    }