function suspendListener(obj, eventName, target, method, callback) {
  if (!method && 'function' === typeof target) {
    method = target;
    target = null;
  }

  var actions = actionsFor(obj, eventName),
      actionIndex = indexOf(actions, target, method);

  if (actionIndex !== -1) {
    actions[actionIndex+2] |= SUSPENDED; // mark the action as suspended
  }

  function tryable()   { return callback.call(target); }
  function finalizer() { if (actionIndex !== -1) { actions[actionIndex+2] &= ~SUSPENDED; } }

  return Ember.tryFinally(tryable, finalizer);
}
function suspendListener(obj, eventName, target, method, callback) {
  if (!method && 'function' === typeof target) {
    method = target;
    target = null;
  }

  var actions = actionsFor(obj, eventName),
      actionIndex = indexOf(actions, target, method);

  if (actionIndex !== -1) {
    actions[actionIndex+2] |= SUSPENDED; // mark the action as suspended
  }

  function tryable()   { return callback.call(target); }
  function finalizer() { if (actionIndex !== -1) { actions[actionIndex+2] &= ~SUSPENDED; } }

  return Ember.tryFinally(tryable, finalizer);
}
function suspendListener ( obj , eventName , target , method , callback ) { if ( ! method && 'function' === typeof target ) { method = target ; target = null ; } var actions = actionsFor ( obj , eventName ) , actionIndex = indexOf ( actions , target , method ) ; if ( actionIndex !== - 1 ) { actions [ actionIndex + 2 ] |= SUSPENDED ; // mark the action as suspended } function tryable ( ) { return callback . call ( target ) ; } function finalizer ( ) { if ( actionIndex !== - 1 ) { actions [ actionIndex + 2 ] &= ~ SUSPENDED ; } } return Ember . tryFinally ( tryable , finalizer ) ; }
Suspend listener during callback.

This should only be used by the target of the event listener
when it is taking an action that would cause the event, e.g.
an object might suspend its property change listener while it is
setting that property.

@method suspendListener
@for Ember

@private
@param obj
@param {String} eventName
@param {Object|Function} targetOrMethod A target object or a function
@param {Function|String} method A function or the name of a function to be called on `target`
@param {Function} callback
Suspend listener during callback .