Stop watching for files.

        Stop the observer started by watch function and finish
        thread life.
432068
def stop_watching(self):
        
        self._watch = False

        if self._observer:
            self._logger.info('Stopping watcher')
            self._observer.stop()
            self._logger.info('Watcher stopped')
809842
def stop(self):
        
        super(Icmpecho, self).stop()
        self.monitor_thread.join()
        logging.info("ICMPecho health monitor plugin: Stopped")
1180095
async def stop(self):
        
        await self.__receiver.stop()
        await self.__sender.stop()
        self.__stopped = True
1346644
def stop_watching(self, cluster):
        
        znode_path = "/".join([self.base_path, cluster.name])
        if znode_path in self.stop_events:
            self.stop_events[znode_path].set()
1118048
def stopdocs():
    ""
    for i in range(4):
        pid = watchdog_pid()
        if pid:
            if not i:
                sh('ps {}'.format(pid))
            sh('kill {}'.format(pid))
            time.sleep(.5)
        else:
            break
278072
def stop(self):
        '''
        
        '''
        self._stop_event.set()
        if self._func_stop_event is not None:
            self._func_stop_event.set()
        self.join(timeout=1)
        if self.isAlive():
            print('Failed to stop thread')
271632
def stop(self):
        
        self.listener.setsockopt(LINGER, 1)
        self.loop = False
        with nslock:
            self.listener.close()
641536
public void stop() throws IOException {
		synchronized (this.monitor) {
			if (this.serverThread != null) {
				this.serverThread.close();
				try {
					this.serverThread.join(2000);
				}
				catch (InterruptedException ex) {
					Thread.currentThread().interrupt();
				}
				this.serverThread = null;
			}
		}
	}
248761
def close(self):
        """"""
        if self.streamSock:
            self.watch(enable=False)
            self.streamSock.close()
        self.streamSock = None
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");
}
865477
def stop_watch(self):
        

        if self.greenlet_watch:
            self.greenlet_watch.kill(block=False)
            self.greenlet_watch = None
360223
def stop_plugins(watcher_plugin, health_plugin):
    
    logging.debug("Stopping health-check monitor...")
    health_plugin.stop()

    logging.debug("Stopping config change observer...")
    watcher_plugin.stop()
1210949
public synchronized void stop() {

        _coreMonitor.unregister();

        for (ServiceReg<FileMonitor> reg : _monitors.values()) {
            reg.unregister();
        }

        _monitors.clear();

        // Tidy up old location if we built it
        tidyUpMonitoredDirectory(createdMonitoredDir.get(), monitoredDirectory.get());
    }
416420
function watchFile(file, callback) {
	let absolutePath = File.find(file).path();
	let watcher = chokidar
		.watch(
			absolutePath,
			{
				persistent: true
			}
		)
		.on(
			'change',
			function () {
				if (typeof callback === 'function') {
					callback(file);
				}
				watcher.unwatch(absolutePath);
				watchFile(file, callback);
			}
		)
	;
}
211119
def close_stream(self):
		
		self.keep_listening = False
		self.stream.stop()
		self.stream.close()
632914
def teardown(self):
        '''
        
        '''
        self.monitor_thread.stop()
        self.monitor_thread = None
        super(BaseMonitor, self).teardown()
1022335
public static void shutdown() throws IOException {
        if (watcher != null) {
            synchronized (watcher) {
                log.info("Closing filesystem monitor.");
                watcher.close();
                watcher = null;
            }
        }
    }