code: func (ce *cacheEntry) loadRemoteTerminalIndex(tidx types.MessageIndex) {
  	// Never load an invalid remote terminal index.
  	if tidx < 0 {
  		return
  	}
  
  	// Load the remote terminal index if one isn't already loaded.
  	ce.withLock(func() {
  		if ce.terminalIndex < 0 {
  			ce.terminalIndex = tidx
  		}
  	})
  }
docs: // loadRemoteTerminalIndex updates our cached remote terminal index with tidx,
  // if tidx >= 0 and a remote terminal index is not already cached.
  //
  // This is executed in the bodies of the register and terminate Promises if they
  // receive a terminal index remotely.