Make sure the pull and push processing is running.
960706
private void ensurePullAndPushRunning() {
        log.trace("State should be PLAYING to running this task: {}", subscriberStream.getState());
        if (pullMode && pullAndPush == null && subscriberStream.getState() == StreamState.PLAYING) {
            // client buffer is at least 100ms
            pullAndPush = subscriberStream.scheduleWithFixedDelay(new PullAndPushRunnable(), 10);
        }
    }
1232366
def before_run(self):
        """"""
        # Actions and checks counters
        self.nb_checks = 0
        self.nb_internal_checks = 0
        self.nb_checks_launched = 0
        self.nb_actions_launched = 0

        self.nb_checks_results = 0
        self.nb_checks_results_timeout = 0
        self.nb_checks_results_passive = 0
        self.nb_checks_results_active = 0

        self.nb_actions_results = 0
        self.nb_actions_results_timeout = 0
        self.nb_actions_results_passive = 0

        self.nb_broks_dropped = 0
        self.nb_checks_dropped = 0
        self.nb_actions_dropped = 0

        # Broks, notifications, ... counters
        self.nb_broks = 0
        self.nb_notifications = 0
        self.nb_event_handlers = 0
        self.nb_external_commands = 0

        self.ticks = 0
1234942
@Override
	public void run() {

		while (!stopProcessing.get()) {

			try {
				JawrWatchEvent evt = watchEvents.take();
				AtomicBoolean processingBundle = bundlesHandler.isProcessingBundle();
				synchronized (processingBundle) {

					// Wait until processing ends
					while (processingBundle.get() && !stopProcessing.get()) {
						try {
							processingBundle.wait();
						} catch (InterruptedException e) {
							LOGGER.debug("Thread interrupted");
						}
					}
				}
				if (evt != null && !stopProcessing.get()) {
					process(evt);
				}
			} catch (InterruptedException e) {
				LOGGER.debug("Thread interrupted");
			}
		}
		
		this.bundlesHandler = null;
		this.watcher = null;
	}
367157
def trigger_pull(queue, ignore_listener=False, trigger=_c.FSQ_TRIGGER):
    ''''''
    fd = None
    trigger_path = fsq_path.trigger(queue, trigger=trigger)
    _queue_ok(os.path.dirname(trigger_path))
    try:
        fd = os.open(trigger_path,
                     os.O_NDELAY|os.O_NONBLOCK|os.O_APPEND|os.O_WRONLY)
        os.write(fd, '\0')
    except (OSError, IOError, ), e:
        if e.errno != errno.ENXIO:
            if e.errno != errno.EAGAIN and e.errno != errno.EWOULDBLOCK:
                raise FSQTriggerPullError(e.errno, wrap_io_os_err(e))
        elif not ignore_listener:
            raise FSQTriggerPullError(e.errno, u'No listener for:'\
                                      u' {0}'.format(trigger_path))
    finally:
        if fd is not None:
            os.close(fd)
1355389
def run(self):
        
        progress_printer = ProgressPrinter(self.different_items.total_items(), msg_verb='sending')
        upload_settings = UploadSettings(self.config, self.remote_store.data_service, progress_printer,
                                         self.project_name_or_id, self.file_upload_post_processor)
        project_uploader = ProjectUploader(upload_settings)
        project_uploader.run(self.local_project)
        progress_printer.finished()
1316673
def apply
      started_at = DateTime.now.to_s
      # Check if a Puppetfile is neccesary for use/not use librarian-puppet
      check_puppetfile_content
      # Copy static modules that are not downloaded by librarian-puppet
      copy_static_modules
      # Apply step and if the process is succesful create the checkpoint.
      process_status = apply_step
      create_step_checkpoint(started_at) if process_status.success?
      process_status
    end
1198396
def _run_done_callbacks(self):
        ''' 
        '''
        with self._callbacks_lock:
            for callback in self._done_callbacks:
                try:
                    callback()
                # We do not want a callback interrupting the process, especially
                # in the failure cleanups. So log and catch, the excpetion.
                except Exception as ex:
                    logger.error("Exception: %s" % str(ex))
                    logger.error("Exception raised in %s." % callback, exc_info=True)

            self._done_callbacks = []
820943
def is_running(self):
        
        if self.block:
            return False

        return self.thread.is_alive() or self.process.poll() is None
607089
def run(self):
        '''
        
        '''
        salt.utils.process.appendproctitle(self.__class__.__name__)

        # init things that need to be done after the process is forked
        self._post_fork_init()

        # Make Start Times
        last = int(time.time())

        old_present = set()
        while True:
            now = int(time.time())
            if (now - last) >= self.loop_interval:
                salt.daemons.masterapi.clean_old_jobs(self.opts)
                salt.daemons.masterapi.clean_expired_tokens(self.opts)
                salt.daemons.masterapi.clean_pub_auth(self.opts)
                salt.daemons.masterapi.clean_proc_dir(self.opts)
            self.handle_git_pillar()
            self.handle_schedule()
            self.handle_key_cache()
            self.handle_presence(old_present)
            self.handle_key_rotate(now)
            salt.utils.verify.check_max_open_files(self.opts)
            last = now
            time.sleep(self.loop_interval)
347860
def run(self):
        """"""
        # Catch all possible exceptions raised by the running thread
        # and let parent process know about it.
        try:
            self._run()
        except Exception:  # pylint: disable=broad-except
            self.action.put(
                ServiceCheckDiedError(self.name, traceback.format_exc())
            )
265813
private function ensureProcessIsStarted(): void
    {
        if (is_resource($this->process) === false) {
            $this->startProcess();

            $this->handleStartupErrors();
        }
    }
715544
def run(self):
        '''
        
        '''
        self.thread = Thread(target=self.__processQueue)
        self.thread.start()
1114053
def pull(self):
        """"""
        repo_root = settings.REPO_ROOT
        pull_from_origin(join(repo_root, self.name))
798083
def update(self):
        

        try:
            stdout = self.repo.pull().stdout
            logger.info(stdout)
        except:
            logger.info('Pull not working. Remote not defined?')
807197
def _EnsureRequesterStarted(self):
    """"""
    if not self._analyzer_started:
      self._analyzer.start()
      self._analyzer_started = True
505598
function done(error) {
    if (error) {
      errors.push(error);
    }
    if (--initializing <= 0) {
      if (errors && errors.length) {
        var errorResult = new Error('Errors occurred during initialization.');
        errorResult.initializationErrors = errors;
        callback(errorResult);
      } else {
        processPostInitializeQueue(postInitializeQueue, callback);
      }
    }
  }
1061991
def run(self):
        

        self._systemd_notify_once()
        self._child_supervisor = _utils.spawn(self._child_supervisor_thread)
        self._wait_forever()