Run the collection cycle.
426800
@Override
    public final void run() {
        try {
            registry_.updateCollection();

            final long t0 = System.nanoTime();

            processors_.forEach(p -> {
                try {
                    run_implementation_(p);
                } catch (Exception ex) {
                    logger.log(Level.SEVERE, p.getClass().getName() + " failed to run properly, some or all metrics may be missed this cycle", ex);
                }
            });

            final long t_processor = System.nanoTime();
            registry_.updateProcessorDuration(Duration.millis(TimeUnit.NANOSECONDS.toMillis(t_processor - t0)));
        } catch (Throwable t) {
            /*
             * We catch any and all throwables.
             * If we don't and let an exception or error escape,
             * the scheduled executor service will _silently_ drop our task.
             */
            logger.log(Level.SEVERE, "failed to perform collection", t);
        }
    }
516471
public function run()
    {
        $this->isRan = true;
        foreach ($this->headerList as $sHeader) {
            header($sHeader);
        }
    }
1352990
def _run(self):
        
        try:
            start_time = time.time()

            # Collect Data
            self.collect()

            end_time = time.time()
            collector_time = int((end_time - start_time) * 1000)

            self.log.debug('Collection took %s ms', collector_time)

            if 'measure_collector_time' in self.config:
                if self.config['measure_collector_time']:
                    metric_name = 'collector_time_ms'
                    metric_value = collector_time
                    self.publish(metric_name, metric_value)
        finally:
            # After collector run, invoke a flush
            # method on each handler.
            for handler in self.handlers:
                handler._flush()
336879
@Override
    public void run() {
        Collections.sort(files);
        for (int i = files.size() - 1; i >= 0; i--) {
            new File(files.get(i)).delete();
        }
    }
1218409
def run(self):
        
        if not self._has_yielded and not self.task.local_workflow_require_branches:
            self._has_yielded = True

            yield list(self.task.get_branch_tasks().values())

        self._has_run = True
228794
def run(self):
        """"""
        self.signal_init()
        self.listen_init()
        self.logger.info('starting')
        self.loop.start()
879928
public void runCycle(int... valuesForMap) {
        /// prepare the map Object array recycler for a new cycle.
        HeapFriendlyMapArrayRecycler.get().swapCycleObjectArrays();

        try {
            makeDataAvailableToApplication(valuesForMap);
        } finally {
            // fill all of the Object arrays which were returned to the pool on this cycle with nulls,
            // so that the garbage collector can clean up any data which is no longer used.
            HeapFriendlyMapArrayRecycler.get().clearNextCycleObjectArrays();
        }
    }
217440
public function run()
    {
        if ($this->count()) {

            $request = server_request();

            foreach ($this->registry as $offset => $handler) {
                $this->process($request, $handler);
            }
        }
    }
872906
protected function run($models)
    {
        $models = collect($models);
        if ($models->count() > 0) {
            $model = $models->first();

            if (!is_object($model)) {
                return;
            }

            if (!$this->isCascadable($model)) {
                return;
            }

            if (!in_array($model->getConnectionName(), $this->dbsToTransact)) {
                $this->dbsToTransact[] = $model->getConnectionName();
                DB::connection($model->getConnectionName())->beginTransaction();
            }

            $this->relations($model, $models->pluck($model->getKeyName()));
        }
    }
533610
def run(self):
        
        self.thr = threading.Thread(target=self.collect_and_report)
        self.thr.daemon = True
        self.thr.name = "Instana Metric Collection"
        self.thr.start()
234405
def Run(self, args):
    """"""
    try:
      directory = vfs.VFSOpen(args.pathspec, progress_callback=self.Progress)
    except (IOError, OSError) as e:
      self.SetStatus(rdf_flows.GrrStatus.ReturnedStatus.IOERROR, e)
      return

    files = list(directory.ListFiles())
    files.sort(key=lambda x: x.pathspec.path)

    for response in files:
      self.SendReply(response)
99459
def on_finish(self, exc=None):
        """"""
        super(GarbageCollector, self).on_finish(exc)
        self._cycles_left -= 1
        if self._cycles_left <= 0:
            num_collected = gc.collect()
            self._cycles_left = self.collection_cycle
            LOGGER.debug('garbage collection run, %d objects evicted',
                         num_collected)
1347370
def run(self):
        """"""
        self._logger.info('starting all runners')
        try:
            with self._lock:
                assert not self.running.set(), 'cannot re-run: %s' % self
                self.running.set()
            thread_runner = self.runners[threading]
            for runner in self.runners.values():
                if runner is not thread_runner:
                    thread_runner.register_payload(runner.run)
            if threading.current_thread() == threading.main_thread():
                asyncio_main_run(root_runner=thread_runner)
            else:
                thread_runner.run()
        except Exception as err:
            self._logger.exception('runner terminated: %s', err)
            raise RuntimeError from err
        finally:
            self._stop_runners()
            self._logger.info('stopped all runners')
            self.running.clear()
1169514
public function iterateCollections()
    {
        $currentCollection = $this;
        yield $this;
        while ($currentCollection->hasNextCollection()) {
            $currentCollection = $currentCollection->getNextCollection();
            yield $currentCollection;
        }
    }
1264012
def load(self):
        """"""
        self._list = self._source.load()
        self._list_iter = itertools.cycle(self._list)
1003339
def collection_cycle(self, value):
        
        if value is not None:
            self._collection_cycle = value
            self._cycles_left = min(self._cycles_left, self._collection_cycle)
444782
public function run()
    {
        $this->clear_data();

        $this->call(ProvincesSeeder::class);
        $this->call(CitiesSeeder::class);
        $this->call(DistrictsSeeder::class);
        $this->call(VillagesSeeder::class);
    }