public QueueElement dequeue (AbstractQueue<QueueElement> queue) 
            throws InterruptedException {
        logger.entering(loggerName, "dequeue", queue);

        QueueElement qe = null;
        while (qe == null) {
            if ((qe = queue.poll()) == null)
                Thread.currentThread().sleep(200);
        }
        
        logger.exiting(loggerName, "dequeue", qe);
        
        return qe;
    }