code: function() {
          var queue = this._queue;
          var globalOptions = this.globalOptions;
          var options = this.options;
          var before = options && options.before;
          var after = options && options.after;
          var onError = globalOptions.onError || (globalOptions.onErrorTarget && globalOptions.onErrorTarget[globalOptions.onErrorMethod]);
          var target, method, args, stack, i, l = queue.length;
  
          this.targetQueues = Object.create(null);
  
          if (l && before) { before(); }
          for (i = 0; i < l; i += 4) {
            target = queue[i];
            method = queue[i+1];
            args   = queue[i+2];
            stack  = queue[i+3]; // Debugging assistance
  
            // TODO: error handling
            if (args && args.length > 0) {
              if (onError) {
                try {
                  method.apply(target, args);
                } catch (e) {
                  onError(e);
                }
              } else {
                method.apply(target, args);
              }
            } else {
              if (onError) {
                try {
                  method.call(target);
                } catch(e) {
                  onError(e);
                }
              } else {
                method.call(target);
              }
            }
          }
          if (l && after) { after(); }
  
          // check if new items have been added
          if (queue.length > l) {
            this._queue = queue.slice(l);
            this.flush();
          } else {
            this._queue.length = 0;
          }
        }
docs: TODO: remove me, only being used for Ember.run.sync