Internal method to remove a watch block for stopping event monitoring.
493739
def _remove_watch_block(self, wb):
		
		if (self._wbslock == None):
			self._wbslock = Lock()

		self._wbslock.acquire()
		self._wbs.remove(wb)
		if len(self._wbs) == 0:
			self._stop_enqueue_thread()
			self._stop_dequeue_thread()

		self._wbslock.release()
767309
def unwatch(self):
        """"""
        if self.watchers is not None:
            unwatched = []
            for watcher in self.watchers:
                watcher.inst.param.unwatch(watcher)
                unwatched.append(watcher)
            self.watchers = [w for w in self.watchers if w not in unwatched]
200795
function(file) {
    for(var i = 0; i < watchList.length; i++) {
        if(watchList[i].file === file) {
            watchers[i].close();
            watchList.splice(i, 1);
            watchers.splice(i, 1);
            return;
        }
    }
    throw new Error(file + " was not being watched previously");
}
559111
private void stopActivityMonitor(){
		try {
			// Remove the monitor added during startup
			if (activityMonitor != null) {
				inst.removeMonitor(activityMonitor);
				activityMonitor = null;
			}
		} catch (Exception ignored) {}

	}
32730
function () {
		this.stop();
		this.listenTo(this.items, EVENT_ADD, this.triggerAdd);
		this.listenTo(this.items, EVENT_REMOVE, this.triggerRemove);
		this.listenTo(this.items, EVENT_SORT, this.triggerSort);
		this.listenTo(this.items, EVENT_ADD, this.updateLength);
		this.listenTo(this.items, EVENT_REMOVE, this.updateLength);
		this.listenTo(this.items, EVENT_ADD, this.watchItem);
		this.listenTo(this.items, EVENT_REMOVE, this.unwatchItem);
	}
885978
def __clear_variable_watch(self, tid, address):
        
        if self.has_hardware_breakpoint(tid, address):
            self.erase_hardware_breakpoint(tid, address)
849044
def remove_listener(self, event_name, listener):
        """"""
        self.listeners[event_name].remove(listener)
        return self
649401
function () {
        if (this.active && this.watchId !== null) {
            this.geolocation.clearWatch(this.watchId);
        }
        return OpenLayers.Control.prototype.deactivate.apply(
            this, arguments
        );
    }
1282139
private synchronized void remove(TableRowProgressMonitor monitor) {
    final int row = monitors.indexOf(monitor);
    if (row >= 0) {
      monitors.remove(row);
      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          fireTableRowsDeleted(row, row); // row your boat...
        }
      });
    }
  }
886919
def clear_watch_restrictions(event, watch_type)
      return unless event.node_event?

      if watch_type
        logger.debug { "re-allowing #{watch_type.inspect} watches on path #{event.path.inspect}" }
        
        # we recieved a watch event for this path, now we allow code to set new watchers
        @outstanding_watches[watch_type].delete(event.path)
      end
    end
952032
protected function disarmTimeoutMonitor()
    {
        if (isset($this->timeout)) {
            $this->loop->cancelTimer($this->timeout);
            $this->timeout = null;
        }
    }
441752
public void stopWatching() {
    try {
      _watchService.close();
      _watchService = null;
      _watchedDirectories = null;
    } catch (IOException e) {
      throw new RuntimeException("Could not stop watching directories!", e);
    }
  }
442912
def stop_listening(cls, event, func):
        """"""
        signal(event).disconnect(func, sender=cls)
1082367
@Deprecated
    public void stopWatching(File file) {
        if (file == null) {
            throw new IllegalArgumentException("Null file argument");
        }
        synchronized (mutex) {
            stopWatchingInternal(file.toPath());
        }
    }
1028521
def stop(self):
        """"""
        if self.closed:
            raise ConnectionClosed()

        if self.read_watcher.active:
            self.read_watcher.stop()
        if self.write_watcher.active:
            self.write_watcher.stop()
95385
def _close_event_stream(self):
        """"""
        self.__subscribed = False
        del self.__events[:]
        self.__event_handle.clear()
1026000
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth")
  public static void cancel() {
    final int stackDepth = ThreadUtils.stackDepth();

    final List<TimeData> list = REGISTRY.get();

    list.removeIf(timeWatchItem -> timeWatchItem.getDetectedStackDepth() >= stackDepth);
    if (list.isEmpty()) {
      REGISTRY.remove();
    }
  }