while (!m_queue.isEmpty()) { Thread.yield();
try { while (!m_queue.isEmpty()) { Thread.sleep(10); } } catch (InterruptedException e) {
    public void yieldTillEmpty() {        while (!m_queue.isEmpty()) {            Thread.yield();        }    }