try { for (;;) { TaskNode task = nextTask(); if (task != null) task.command.run(); else break; } } finally { clearThread(); } }
while (cont) { TaskNode task = nextTask(); if (task != null && cont) task.command.run(); else { LOG.debug("exiting"); return; } } }
    public void run() {      try {        for (;;) {          TaskNode task = nextTask();          if (task != null)             task.command.run();          else            break;        }      }      finally {        clearThread();      }    }