What is the name for this pattern?
astrodust: That's essentially re-queuing a repeating task, and the task is to process blocks of work incrementally until completion. This is not unlike what happens in an operating system that uses cooperative multitasking.You might consider a refinement of the pattern where doSomeWork() returns true if the work queue still has things left, or false if it is finished. As a matter of convenience, doSomeWork() should handle finishing as a final task to avoid the redundant isDone() check.A slight refactoring could be:  processor = function() {
    if (processWork())
      window.setTimer(processor, 0);
  }