src/index.js
/**
     * @summary Invalidates this computation so that it will be rerun.
     * @locus Client
     */
@summary Invalidates this computation so that it will be rerun.
@locus Client
@summary Invalidates this computation so that it will be rerun . @locus Client
invalidate() {
      var self = this;
      if (! self.invalidated) {
        if (! self._recomputing && ! self.stopped) {
          requireFlush();
          pendingComputations.push(this);
        }
        self.invalidated = true;
        for(var i = 0, f; f = self._onInvalidateCallbacks[i]; i++) {
          Tracker.nonreactive(function () {
            withNoYieldsAllowed(f)(self);
          });
        }
        self._onInvalidateCallbacks = [];
      }
    }
invalidate ( ) { var self = this ; if ( ! self . invalidated ) { if ( ! self . _recomputing && ! self . stopped ) { requireFlush ( ) ; pendingComputations . push ( this ) ; } self . invalidated = true ; for ( var i = 0 , f ; f = self . _onInvalidateCallbacks [ i ] ; i ++ ) { Tracker . nonreactive ( function ( ) { withNoYieldsAllowed ( f ) ( self ) ; } ) ; } self . _onInvalidateCallbacks = [ ] ; } }
@summary Invalidates this computation so that it will be rerun.
@summary Invalidates this computation so that it will be rerun .
// if we're currently in _recompute(), don't enqueue // ourselves, since we'll rerun immediately anyway. // callbacks can't add callbacks, because // self.invalidated === true.