public synchronized void close() {
        closed = true;
        notify();
    }
Close this queue. After this method is invoked, no more objects
may be enqueued on this queue. Also, trying to dequeue an
object form a queue that is both empty and closed will cause a
{@link EndOfQueueException}.
jrt/src/com/yahoo/jrt/ThreadQueue.java