public synchronized void put(T item) throws InterruptedException
    {
        // Queue is full - wait
        while (mQueue.size() >= mCapacity)
            wait();
        mQueue.add(item);
        notifyAll();
    }