start the lexicon autoload thread
334843
public void startAutoload() 
    {
        if ( autoloadThread != null 
                || config.getLexiconPath() == null ) {
            return;
        }
        
        //create and start the lexicon auto load thread
        autoloadThread = new Thread(new Runnable() {
            @Override
            public void run() {
                String[] paths = config.getLexiconPath();
                AutoLoadFile[] files = new AutoLoadFile[paths.length];
                for ( int i = 0; i < files.length; i++ ) {
                    files[i] = new AutoLoadFile(paths[i] + "/" + AL_TODO_FILE);
                    files[i].setLastUpdateTime(files[i].getFile().lastModified());
                }
                
                while ( true ) {
                    //sleep for some time (seconds)
                    try {
                        Thread.sleep(config.getPollTime() * 1000);
                    } catch (InterruptedException e) {break;}
                    
                    
                    //check the update of all the reload todo files
                    File f          = null;
                    AutoLoadFile af = null;
                    
                    for ( int i = 0; i < files.length; i++ ) {
                        af  = files[i];
                        f   = files[i].getFile();
                        
                        if ( ! f.exists() ) continue;
                        if ( f.lastModified() <= af.getLastUpdateTime() ) {
                            continue;
                        }
                        
                        //load words form the lexicon files
                        try {
                            BufferedReader reader = new BufferedReader(new FileReader(f));
                            String line = null;
                            while ( ( line = reader.readLine() ) != null ) {
                                line = line.trim();
                                if ( line.indexOf('#') != -1 ) continue;
                                if ( "".equals(line) ) continue; 
                                load(paths[i] + "/" + line);
                            }
                            
                            reader.close();
                            
                            FileWriter fw = new FileWriter(f);
                            fw.write("");
                            fw.close();
                            
                            //update the last update time
                            //@Note: some file system may close the in-time last update time update
                            //    in that case, this won't work normally.
                            //but, it will still work!!!
                            af.setLastUpdateTime(f.lastModified());
                            //System.out.println("newly added words loaded for path " + f.getParent());
                        } catch (IOException e) {
                            break;
                        }
                    }
                    
                    //flush the synonyms buffer
                    resetSynonymsNet();
                }
            }
            
        });
        
        autoloadThread.setDaemon(true);
        autoloadThread.start();
    }
978823
final void start() {
        _enabled = true;
        _ignoredSegs.clear();
        _executor = Executors.newSingleThreadExecutor(new DaemonThreadFactory());
        _executor.execute(this);
    }
435341
def run(self):
        
        while True:
            try:
                self._callback(self.wait_read_frame())
            except ThreadQuitException:
                # Expected termintation of thread due to self.halt()
                break
            except Exception as e:
                # Unexpected thread quit.
                if self._error_callback:
                    self._error_callback(e)
436748
def start(self):
        
        self.running = True
        self.thread = threading.Thread(target=self._main_loop)
        self.thread.start()
854509
def _start(self):
        
        params = self._translate(self._options)
        self._resp = self._r_session.get(self._url, params=params, stream=True)
        self._resp.raise_for_status()
        self._lines = self._resp.iter_lines(self._chunk_size)
1351890
public void launchAuto(AutomaticClusterManagementThread auto) {
        killAuto();
        if (mSock != null) {
            mAuto = auto;
            if (mAuto != null) {
                mAuto.start();
            }
        }
    }
390956
def start(self):
        """"""
        assert not self.interrupted
        for thread in self.worker_threads:
            thread.start()
        WorkerThread.start(self)
454083
async def startup(self, app):
        """"""
        self.local = slocal(app.loop)
        if self.cfg.configure_jinja2 and 'jinja2' in app.ps:
            app.ps.jinja2.env.add_extension('jinja2.ext.i18n')
            app.ps.jinja2.env.install_gettext_callables(
                lambda x: self.get_translations().ugettext(x),
                lambda s, p, n: self.get_translations().ungettext(s, p, n),
                newstyle=True
            )

        if self.locale_selector_func:
            app.middlewares.append(self._middleware)
1135467
def threaded_start(self, no_init=False):
        '''
        
        '''
        thread = Thread(target=self.init_connections, kwargs={
                        'no_init': no_init})
        thread.setDaemon(True)
        thread.start()
        thread.join()
287440
def start(self):
        
        self.running = True
        while self.running:
            self.update_prompt()
            try:
                self.cmdloop()
            except KeyboardInterrupt:
                print()
            except botocore.exceptions.BotoCoreError as e:
                print(e)
            except ParseException as e:
                print(self.engine.pformat_exc(e))
            except Exception:
                traceback.print_exc()
            self.engine.reset()
1018594
public function run()
    {
        require __DIR__.'/../../../../vendor/autoload.php';
        $handler_pool = new \Pool($this->API->settings['threading']['handler_workers']);
        $this->ready = true;
        while ($this->API->run_workers) {
            try {
                $this->API->datacenter->sockets[$this->current]->reading = true;
                //$this->logger->logger('RECEIVING');
                $error = $this->API->recv_message($this->current);
                $this->logger->logger('NOW HANDLE');
                $handler_pool->submit(new SocketHandler($this->API, $this->current, $error));
                $this->logger->logger('SUBMITTED');
                $this->API->datacenter->sockets[$this->current]->reading = false;
            } catch (\danog\MadelineProto\NothingInTheSocketException $e) {
                //$this->logger->logger('Nothing in the socket for dc '.$this->current, \danog\MadelineProto\Logger::VERBOSE);
            }
        }
        while ($number = $handler_pool->collect()) {
            $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['shutting_down_handler_pool'], $this->current, $number), \danog\MadelineProto\Logger::NOTICE);
        }
        $this->setGarbage();
    }
402397
def run_with_reloader(main_func, extra_files=None, interval=1, reloader_type="auto"):
    """"""
    import signal

    reloader = reloader_loops[reloader_type](extra_files, interval)
    signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))
    try:
        if os.environ.get("WERKZEUG_RUN_MAIN") == "true":
            ensure_echo_on()
            t = threading.Thread(target=main_func, args=())
            t.setDaemon(True)
            t.start()
            reloader.run()
        else:
            sys.exit(reloader.restart_with_reloader())
    except KeyboardInterrupt:
        pass
775119
def start(self):
        """"""
        if not self.writeThread.isAlive() and not self.readThread.isAlive():
            self.client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            self.client.connect(self.ADDR)
            self.running = True
            self.writeThread.start()
            self.readThread.start()
1319534
public static function autoStart()
    {
        if (ini_get("tideways.auto_start") || isset($_SERVER["TIDEWAYS_AUTO_START"])) {
            if (self::isStarted() === false) {
                switch (php_sapi_name()) {
                    case 'cli':
                        if (ini_get("tideways.monitor_cli") || isset($_SERVER['TIDEWAYS_SESSION'])) {
                            self::start(array('service' => 'cli'));
                        }
                        break;

                    default:
                        self::start();
                }
            }
        }

        if (self::requiresDelegateToOriginalPrependFile()) {
            require_once ini_get("auto_prepend_file");
        }
    }
767196
def run(self):
        
        self._connection = self.connect()
        self._connection.ioloop.start()
53655
def run(self):
        """"""
        notice('Starting output thread', self.color)
        o = Thread(target=self.__output_thread, name='output')
        o.start()
        self.threads.append(o)
        try:
            notice('Starting input thread', self.color)
            self.__input_thread()
        except KeyboardInterrupt:
            self.__shutdown()
904309
def _thread_init(cls):
    """"""
    if not hasattr(cls._local, '_in_order_futures'):
      cls._local._in_order_futures = set()
      cls._local._activated = False