void () { final MyQueue queue = new MyQueue(); queue.showNotify(); queue.queue(new MyUpdate("update") { @Override public boolean isExpired() { queue.flush(); return false; } }); waitForExecution(queue); }