Starts the watcher.<p>
547038
private void startWatcher() {

        if (m_watcher == null) {
            try {
                m_watcher = new CmsUploadTimeoutWatcher(this);
                m_watcher.start();
            } catch (Exception e) {
                LOG.info(
                    Messages.get().getBundle().key(Messages.LOG_UPLOAD_CREATE_WATCH_DOG_2, getId(), e.getMessage()));
            }
        }
    }
1351674
public void start() {

        if (m_writeHtml) {
            try {
                m_printStream.println(
                    CmsWorkplace.generatePageStartExtended(
                        OpenCms.initCmsObject(OpenCms.getDefaultUsers().getUserGuest()),
                        OpenCms.getSystemInfo().getDefaultEncoding()));
            } catch (CmsException e) {
                // ignore
            }
        }
    }
1359666
def start_watching(self):
        
        if not self.is_sync:
            return

        self._stop = False
        while not self._stop:
            self.reactor.doIteration(0)
1027723
public void start() {
        try {
            while (keepGoing) {
                try {
                    // this is a blocking call so it hogs a thread
                    final Socket socket = ss.accept();
                    final String socketName = socket.getInetAddress().getHostAddress() + ":"
                            + socket.getPort();
                    log.info("accepted socket connection from " + socketName);
                    try {
                        final OutputStream out = socket.getOutputStream();

                        Subscriber<String> subscriber = createSubscriber(socket, socketName, out);
                        subscriptions.add(subscriber);
                        source.subscribeOn(Schedulers.io())
                                // remove subscriber from subscriptions on unsub
                                .doOnUnsubscribe(() -> subscriptions.remove(subscriber))
                                // write each line to the socket OutputStream
                                .subscribe(subscriber);

                    } catch (IOException e) {
                        // could not get output stream (could have closed very
                        // quickly after connecting)
                        // dont' care
                        log.warn(e.getClass().getSimpleName() + ": " + e.getMessage());
                    }
                } catch (SocketTimeoutException e) {
                    // don't care
                    log.warn(e.getClass().getSimpleName() + ": " + e.getMessage());
                }
            }
        } catch (IOException e) {
            if (keepGoing) {
                log.warn(e.getMessage(), e);
                throw new RuntimeException(e);
            } else
                log.info("server stopped");
        } finally {
            closeServerSocket();
        }
    }
1058483
protected function watch()
    {
        $this->showProgress('BOOT: booting watchers...');

        if (is_null($this->loader->watchFolders)) {
            $this->showProgress('No watch folders found.', 'error');

            return;
        }

        foreach ($this->loader->watchFolders as $folder) {
            if (!file_exists($folder)) {
                $this->showProgress("ERROR: folder {$folder} does not exists", 'error');

                continue;
            }

            $this->showProgress('WATCHING '.$folder);

            $this->listeners[$folder] = $this->watcher->watch($folder);

            $this->listeners[$folder]->anything(function ($event, $resource, $path) {
                if (!$this->isExcluded($path)) {
                    $this->fireEvent($event, $resource, $path);
                }
            });
        }

        $this->watchConfigFile();

        $this->watcher->start();
    }
443447
def run(self):
    """"""

    if not (self._watchman and self._watchman.is_alive()):
      raise PantsService.ServiceError('watchman is not running, bailing!')

    # Enable watchman for the build root.
    self._watchman.watch_project(self._build_root)

    subscriptions = list(self._handlers.values())

    # Setup subscriptions and begin the main event firing loop.
    for handler_name, event_data in self._watchman.subscribed(self._build_root, subscriptions):
      self._state.maybe_pause()
      if self._state.is_terminating:
        break

      if event_data:
        # As we receive events from watchman, trigger the relevant handlers.
        self.fire_callback(handler_name, event_data)
965597
public void start() {
        doClose();

        Watcher<PipelineActivity> listener = new Watcher<PipelineActivity>() {
            @Override
            public void eventReceived(Action action, PipelineActivity pipelineActivity) {
                onEventReceived(action, pipelineActivity);
            }

            @Override
            public void onClose(KubernetesClientException e) {
                // TODO should we start watching again?
                LOG.warn("Pipeline watcher is closed: " + e, e);

                for (Watcher<PipelineActivity> listener : listeners) {
                    listener.onClose(e);
                }
            }
        };
        this.watcher = this.pipelines.watch(listener);
        PipelineActivityList list = this.pipelines.list();
        if (list != null) {
            List<PipelineActivity> items = list.getItems();
            if (items != null) {
                for (PipelineActivity item : items) {
                    onEventReceived(Watcher.Action.ADDED, item);
                }
            }
        }
    }
462898
def __start(self):  # pragma: no cover
        """"""

        assert not self._listener_thread

        self._listener_thread = threading.Thread(target=self.__run_listener,
                                                 name='clearly-listener')
        self._listener_thread.daemon = True
        self._listener_thread.start()
        self._wait_event.wait()
        self._wait_event.clear()
1168371
public void onStartup() throws StartupException {
        if (monitor == null) {
            monitor = this;
            thread = new Thread() {
                @Override
                public void run() {
                    this.setName("UserGroupMonitor-thread");
                    monitor.start();
                }
            };
            thread.start();
        }
    }
1025760
@Override
    protected void onStart()
    {
        m_serviceCollection = new ServiceCollection<T>( m_context, m_serviceClass, new CollectionListener() );
        m_serviceCollection.start();
    }
574894
public synchronized void start() throws IOException {
    if (running) {
      throw new IllegalStateException("Monitor is already running");
    }
    for (final PathAlterationObserver observer : observers) {
      observer.initialize();
    }

    if (interval > 0) {
        running = true;
        this.executionResult = executor.scheduleWithFixedDelay(this, initialDelay, interval, TimeUnit.MILLISECONDS);
    } else {
        LOGGER.info("Not starting due to non-positive scheduling interval:" + interval);
    }
  }
1212368
def start_watcher_thread(self):
        
        # Create watcher thread
        watcher_thread = threading.Thread(target=self.run_watcher)

        # If the reload mode is `spawn_wait`
        if self._reload_mode == self.RELOAD_MODE_V_SPAWN_WAIT:
            # Use non-daemon thread
            daemon = False

        # If the reload mode is not `spawn_wait`
        else:
            # Use daemon thread
            daemon = True

        # Set whether the thread is daemon
        watcher_thread.setDaemon(daemon)

        # Start watcher thread
        watcher_thread.start()

        # Return watcher thread
        return watcher_thread
1122605
def _start_watching_blocks(self):
        '''
        
        '''
        if sum(map(len, (self.solid_watchers, self.block_watchers))) == 1:
            eth.filter('latest').watch(self._new_block)
943677
private void startupWatchdir() throws Exception {
		File dirToWatch;
		if (this.configuration.getProcessConfigDirOrFile().isFile()) {
			dirToWatch = new File(FilenameUtils.getFullPath(this.configuration.getProcessConfigDirOrFile().getAbsolutePath()));
		} else {
			dirToWatch = this.configuration.getProcessConfigDirOrFile();
		}

		// start the watcher
		this.watcher = new WatchDir(dirToWatch, this);
		this.watcher.start();
	}
793187
@Override
    public synchronized void start() {
        if (monitorActive) {
            return;
        }
        lastTime.set(milliSecondFromNano());
        long localCheckInterval = checkInterval.get();
        if (localCheckInterval > 0) {
            monitorActive = true;
            monitor = new MixedTrafficMonitoringTask((GlobalChannelTrafficShapingHandler) trafficShapingHandler, this);
            scheduledFuture =
                executor.schedule(monitor, localCheckInterval, TimeUnit.MILLISECONDS);
        }
    }
42426
@PostConstruct
    public void start() {
        threadFactory = Executors.defaultThreadFactory();
        disruptor = new Disruptor<>(Registration.FACTORY,
                ringSize,
                threadFactory,
                ProducerType.MULTI,
                new BlockingWaitStrategy());
        disruptor.handleEventsWith(new ContainerEventHandler());
        ringBuffer = disruptor.start();
    }
221669
def start(self):
        """"""
        # observers for this channel only need to wait for one value
        self._observer_params.update(dict(once=True))
        super(CurrentResourceValue, self).start()
        self._api.ensure_notifications_thread()
        self._api._mds_rpc_post(
            device_id=self.device_id,
            method='GET',
            uri=self.resource_path,
            async_id=self.async_id,
            _wrap_with_consumer=False,
        )