 
   ###
    * @param {Array} renderList
-   * @param {Function} setImmediate
+   * @param {Function} defer
   ###
-  constructor: (@plan, @setImmediate)->
+  constructor: (@plan, @defer)->
     @renderId = 0
     @ready = false
     @renderCtx =

        @renderId = 0
        @renderListPosition = 0
        @rendering = false
        @setImmediate(cb)

      return
    enqueue(@renderId)
    return

      if @renderListPosition < @plan.d.length
        fn = @plan.d[@renderListPosition]
        @renderListPosition += 1
        @defer ()=>
          if !@rendering or renderId != @renderId
            console.log('Rendering cancelled for renderId', renderId);
            return
