code: function processWaitingPublishPromises( self, newPromiseResolves ) {
     const waitingResolves = self.waitingPromiseResolves_;
     self.waitingPromiseResolves_ = newPromiseResolves;
  
     waitingResolves.forEach( resolve => resolve() );
  
     if( self.eventQueue_.length === 0 ) {
        // nothing was queued by any subscriber. The publishers can instantly be notified of delivery.
        newPromiseResolves.forEach( resolve => resolve() );
        self.waitingPromiseResolves_ = [];
     }
  }
docs: ////////////////////////////////////////////////////////////////////////////////////////////////////////////