src/promissory-arbiter.js
function resolveUse (appendList, increment, options, resolver) {
    return function resolveUseClosure (value) {
      // TODO This should state.options('update..
      // TODO look at all of options.xxxx
      if (resolver.settled && !options.updateAfterSettlement) {
        return;
      }

      var promise = resolver.promise;
      resolver[appendList].push(value);
      promise[increment] += 1;
      promise.pending -= 1;

      if (resolver.i >= 0) {
        var resume = resolver.resume;

        resumeSubscriptionDispatcher(
          resume.topic, resume.data, options, resume.subscriptions,
          resolver, resume.fulfill, resume.reject
        );
        return;
      }

      evaluateLatch(resolver, options);
    };
  }
function resolveUse (appendList, increment, options, resolver) {
    return function resolveUseClosure (value) {
      // TODO This should state.options('update..
      // TODO look at all of options.xxxx
      if (resolver.settled && !options.updateAfterSettlement) {
        return;
      }

      var promise = resolver.promise;
      resolver[appendList].push(value);
      promise[increment] += 1;
      promise.pending -= 1;

      if (resolver.i >= 0) {
        var resume = resolver.resume;

        resumeSubscriptionDispatcher(
          resume.topic, resume.data, options, resume.subscriptions,
          resolver, resume.fulfill, resume.reject
        );
        return;
      }

      evaluateLatch(resolver, options);
    };
  }
function resolveUse ( appendList , increment , options , resolver ) { return function resolveUseClosure ( value ) { // TODO This should state.options('update.. // TODO look at all of options.xxxx if ( resolver . settled && ! options . updateAfterSettlement ) { return ; } var promise = resolver . promise ; resolver [ appendList ] . push ( value ) ; promise [ increment ] += 1 ; promise . pending -= 1 ; if ( resolver . i >= 0 ) { var resume = resolver . resume ; resumeSubscriptionDispatcher ( resume . topic , resume . data , options , resume . subscriptions , resolver , resume . fulfill , resume . reject ) ; return ; } evaluateLatch ( resolver , options ) ; } ; }
Takes care all the bookkeeping work surrounding a subscriber resolving resolving.
Takes care all the bookkeeping work surrounding a subscriber resolving resolving .