Synchronously stop any potential workers.
489523
def stop_workers(self):
        """"""

        self._started = False

        for worker in self._workers:
            worker.stop()
1232263
def stop(self):
        """"""
        if not self._dead:
            self._killed = True
            self._cancelled.set()
            self._busy_sem.release()
            self.join()
            if not self._ready_sem.acquire(False):
                warning("ISOTP Timer thread may not have stopped "
                        "correctly")
1326700
def stop(args):
  """"""
  if args.local:
    raise ValueError("Stopping commands locally is not supported (please kill them yourself)")
  jm = setup(args)
  jm.stop_jobs(get_ids(args.job_ids))
827397
def stop_jobs(self, job_ids):
    """"""
    self.lock()

    jobs = self.get_jobs(job_ids)
    for job in jobs:
      if job.status in ('executing', 'queued', 'waiting'):
        qdel(job.id, context=self.context)
        logger.info("Stopped job '%s' in the SGE grid." % job)
        job.submit()

      self.session.commit()
    self.unlock()
1170752
def stop(self, exc=None, exit_code=None):
        '''
        '''
        return self._concurrency.stop(self, exc, exit_code)
266872
def _dismiss_worker(self, worker):
        """"""
        self._workers.remove(worker)
        if len(self._workers) < self._min_workers:
            self._workers.add(worker)
            return False
        return True
572682
def stop(self):
        """"""

        if self._disconnector:
            self._disconnector.stop()

        self.client.disconnect()
813438
def stop_sync(self):
        """"""

        if self._control_thread is not None and self._control_thread.is_alive():
            self._control_thread.stop()
            self._control_thread.join()

        if self.jlink is not None:
            self.jlink.close()
1312192
def stop(self):
        
        self.stopped_by_interrupt = True

        if self.executor:
            self.executor.stop()
518337
def stop(self):
        """"""
        if self.interrupted:
            return
        for thread in self.worker_threads:
            thread.interrupted = True
        self.interrupted = True
1159395
public static function stopAll()
    {
        self::$_status = self::STATUS_SHUTDOWN;
        // For master process.
        if (self::$_masterPid === getmypid()) {
            self::log("Workerman[" . basename(self::$_startFile) . "] Stopping ...");
            $worker_pid_array = self::getAllWorkerPids();
            // Send stop signal to all child processes.
            foreach ($worker_pid_array as $worker_pid) {
                swoole_process::kill($worker_pid, SIGINT);
                Timer::add(self::KILL_WORKER_TIMER_TIME, array('\swoole_process','kill'), array($worker_pid, SIGKILL), false);
            }
            // Remove statistics file.
            if (is_file(self::$_statisticsFile)) {
                @unlink(self::$_statisticsFile);
            }
        } // For child processes.
        else {
            // Execute exit.
            foreach (self::$_workers as $worker) {
                $worker->stop();
            }
            self::$globalEvent->destroy();
            exit(0);
        }
    }
436541
async def stop(self):
        """"""

        if self._rpc_task is not None:
            self._rpc_task.cancel()

        try:
            await self._rpc_task
        except asyncio.CancelledError:
            pass

        self._rpc_task = None
841186
def stop(self):
        """"""
        self._end.value = True
        if self.background_process:
            try:
                self.background_process.terminate()
            except Exception:
                pass
        for task_id, values in self.current_tasks.items():
            try:
                values['proc'].terminate()
            except Exception:
                pass
657500
private static void stopAll()
    { 
        if (_configs!=null)
        {
            synchronized(_configs)
            {
                for(int i=0;i<_servers.size();i++)
                {
                    HttpServer server = (HttpServer)_servers.get(i);
                    try{server.stop();}catch(InterruptedException e){}
                }
            }
        }
    }
595628
def stop():
  '''  '''

  output, err = cli_syncthing_adapter.sys(exit=True)
  click.echo("%s" % output, err=err)
116882
public function stop()
    {
        $ResqueStatus = $this->ResqueStatus;

        $this->debug('Searching for active workers');
        $options = new SendSignalCommandOptions();
        $options->title = 'Stopping workers';
        $options->noWorkersMessage = 'There is no workers to stop';
        $options->allOption = 'Stop all workers';
        $options->selectMessage = 'Worker to stop';
        $options->actionMessage = 'stopping';
        $options->workers = call_user_func(self::$Resque_Worker. '::all');
        $options->signal = $this->input->getOption('force')->value === true ? 'TERM' : 'QUIT';
        $options->successCallback = function ($pid, $workerName) use ($ResqueStatus) {
            $ResqueStatus->removeWorker($pid);
        };
        $options->schedulerWorkerActionMessage = 'Stopping the Scheduler Worker';
        $options->schedulerWorkerAction = function($worker) use ($ResqueStatus) {
            $ResqueStatus->unregisterSchedulerWorker();
        };

        $this->sendSignal($options);
    }
284995
def _clean(self):
        """"""
        if self._workers:
            for url in self._workers.copy():
                w = self._workers[url]
                if w.is_finished():
                    self._workers.pop(url)
                    self._paths.pop(url)
                    if url in self._get_requests:
                        self._get_requests.pop(url)

        else:
            self._timer.stop()