Notifies all default file subscribers, that is those that will all be notified no matter what.
353968
public synchronized void notifyDefaultFileSubscribers() {
        for (FileSubscriber sub : defaultFileSubscribers) {
            CompletableFuture.runAsync(sub::update, main.getThreadPoolManager().getAddOnsThreadPool());
        }
    }
905422
def notify(self):
        
        if self.__method is not None:
            self.__method(self.__peer)
            return True
        return False
1031541
public function notifyObservers() {
    /**
     * restore original error handler, to avoid problems when errors occurres
     * in handling other errors
     */
    $this->Web2All->restoreErrorHandlers();
    foreach($this->observers as $observer) {
      $observer->update($this);
    }
    foreach($this->observer_names as $classname) {
      $this->Web2All->PluginGlobal->$classname->update($this);
    }
    // set custom error handlers back
    $this->Web2All->setErrorHandlers();
  }
912860
public function detectChanges()
    {
        $this->signalDispatcher->connect(FlowFileMonitor::class, 'filesHaveChanged', function (string $fileMonitorIdentifier, array $changedFiles) {
            if ($fileMonitorIdentifier === static::FILE_MONITOR_IDENTIFIER) {
                foreach ($changedFiles as $changedFile => $status) {
                    if ($status === ChangeDetectionStrategyInterface::STATUS_DELETED) {
                        $this->unmonitorFile($changedFile);
                        $this->emitFileHasChanged($changedFile);
                    }

                    if ($status === ChangeDetectionStrategyInterface::STATUS_CHANGED) {
                        $this->emitFileHasChanged($changedFile);
                    }
                }
            }
        });

        $fileMonitor = new FlowFileMonitor(static::FILE_MONITOR_IDENTIFIER);
        $files = $this->cache->getByTag('file');

        foreach ($files as $file) {
            $fileMonitor->monitorFile($file);
        }

        $fileMonitor->detectChanges();
        $fileMonitor->shutdownObject();
    }
16668
private void checkAndNotify(final FileStatusEntry parent, final FileStatusEntry[] previous, final Path[] currentPaths)
      throws IOException {

    int c = 0;
    final FileStatusEntry[] current =
        currentPaths.length > 0 ? new FileStatusEntry[currentPaths.length] : FileStatusEntry.EMPTY_ENTRIES;
    for (final FileStatusEntry previousEntry : previous) {
      while (c < currentPaths.length && comparator.compare(previousEntry.getPath(), currentPaths[c]) > 0) {
        current[c] = createPathEntry(parent, currentPaths[c]);
        doCreate(current[c]);
        c++;
      }
      if (c < currentPaths.length && comparator.compare(previousEntry.getPath(), currentPaths[c]) == 0) {
        doMatch(previousEntry, currentPaths[c]);
        checkAndNotify(previousEntry, previousEntry.getChildren(), listPaths(currentPaths[c]));
        current[c] = previousEntry;
        c++;
      } else {
        checkAndNotify(previousEntry, previousEntry.getChildren(), EMPTY_PATH_ARRAY);
        doDelete(previousEntry);
      }
    }

    for (; c < currentPaths.length; c++) {
      current[c] = createPathEntry(parent, currentPaths[c]);
      doCreate(current[c]);
    }
    parent.setChildren(current);
  }
50129
public void checkAndNotify()
      throws IOException {
    /* fire onStart() */
    for (final PathAlterationListener listener : listeners.values()) {
      listener.onStart(this);
    }

    /* fire directory/file events */
    final Path rootPath = rootEntry.getPath();

    if (fs.exists(rootPath)) {
      // Current existed.
      checkAndNotify(rootEntry, rootEntry.getChildren(), listPaths(rootPath));
    } else if (rootEntry.isExists()) {
      // Existed before and not existed now.
      checkAndNotify(rootEntry, rootEntry.getChildren(), EMPTY_PATH_ARRAY);
    } else {
      // Didn't exist and still doesn't
    }

    /* fire onStop() */
    for (final PathAlterationListener listener : listeners.values()) {
      listener.onStop(this);
    }
  }
165460
protected function sendCurrentFiles()
    {
        if (!$this->isDebug()) {
            return;
        }

        $files = array_merge($this->watchedFiles, get_included_files());
        $flipped = array_flip($files);

        //speedy way checking if two arrays are different.
        if (!$this->lastSentFiles || array_diff_key($flipped, $this->lastSentFiles)) {
            $this->lastSentFiles = $flipped;
            $this->sendMessage($this->controller, 'files', ['files' => $files]);
        }

        $this->watchedFiles = [];
    }
795608
void notifyMwRevisionProcessors(MwRevision mwRevision, boolean isCurrent) {
		if (mwRevision == null || mwRevision.getPageId() <= 0) {
			return;
		}
		for (MwRevisionProcessorBroker.RevisionSubscription rs : this.revisionSubscriptions) {
			if (rs.onlyCurrentRevisions == isCurrent
					&& (rs.model == null || mwRevision.getModel().equals(
							rs.model))) {
				rs.mwRevisionProcessor.processRevision(mwRevision);
			}
		}
	}
139963
public function subscribe()
    {
        if (!$this->active) {
            $this->reachedEnd = false;
            $this->client->sendFrame(
                $this->getProtocol()->getSubscribeFrame(
                    $this->subscription->getDestination(),
                    $this->subscription->getSubscriptionId(),
                    $this->subscription->getAck(),
                    $this->subscription->getSelector(),
                    false
                )->addHeaders($this->getHeader())
            );
            $this->active = true;
        }
    }
459712
final public function notify()
  {
    $observers = array_values($this->_observers);
    foreach ($observers as $observer) {
      switch (false) {
        case is_array($observer):
        case isset($observer[0]):
        case isset($observer[1]):
        case is_string($observer[0]):
          break;
        default:
          Loader::loadClass($observer[0]);
          break;
      }

      if (!is_callable($observer)) {
        continue;
      }

      call_user_func($observer, $this);
    }

    return $this;
  }
861833
private function doBeforeCompile(): void
	{
		$builder = $this->getContainerBuilder();
		$dispatcher = $builder->getDefinition($this->prefix('dispatcher'));

		$subscribers = $builder->findByType(EventSubscriberInterface::class);
		foreach ($subscribers as $name => $subscriber) {
			$dispatcher->addSetup('addSubscriber', [$subscriber]);
		}
	}
799960
private void notifyActive(Peer peer) {
		for(Listener listener : new HashSet<>(listeners)) {
			listener.onActive(peer);
		}
	}
502953
function Subscriber(opts) {
  opts = opts || {};

  this._channel = opts.channel || 'default';
  this._subscribers = [];

  /* for mocking */
  var addEventListener = opts.addEventListener || window.addEventListener;
  var attachEvent = opts.attachEvent || window.attachEvent;

  var _this = this;
  function onMessage(e) {
    var event = parse(e.data);
    if (event.channel === _this._channel) {
      for (var i = 0, len = _this._subscribers.length; i < len; i++) {
        _this._subscribers[i].apply({}, event.args);
      }
    }
  }

  if (addEventListener) {
    addEventListener('message', onMessage, false);
  } else {
    attachEvent('onmessage', onMessage, false);
  }
}
248153
def observe_all(self, callback: Callable[[str, Any, Any], None]):
        """"""
        self._all_callbacks.append(callback)
706153
function watchFiles(callback) {
  browserSync.init({
    server: {
      baseDir: "./docs"
    }
  });
  watch("src/sass/**/*.scss", compileSass);
  watch("src/js/**/*.js", compileJS);
  watch("src/index.html", compileHTML);

  callback();
}
159958
def notify(self, reading):
        """"""
        # copy list before iterating in case new observers arrive
        for o in list(self._observers):
            o.update(self, reading)
1011579
def _file_notifier(state):
    
    tstamp = time.time()
    state._tstamp = tstamp
    conf = state.app.config

    file_path = conf.get('WAFFLE_WATCHER_FILE', '/tmp/waffleconf.txt')

    if not os.path.isfile(file_path):
        # Create watch file
        open(file_path, 'a').close()

    # Update timestamp
    os.utime(file_path, (tstamp, tstamp))