Pauses all the worker threads.
177458
def pause(self):
        
        for child in chain(self.consumers.values(), self.workers):
            child.pause()

        for child in chain(self.consumers.values(), self.workers):
            child.paused_event.wait()
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()
105332
public void stopThreads()
    {
        if (threadMap.isEmpty())
        {
            throw new IllegalStateException("threads are already interrupted");
        }
        lock.lock();
        try
        {
            Thread currentThread = Thread.currentThread();
            for (Thread thread : threadMap.values())
            {
                if (!currentThread.equals(thread))
                {
                    thread.interrupt();
                }
            }
            threadMap.clear();
            semaphoreMap.clear();
        }
        finally
        {
            lock.unlock();
        }
    }
821295
def terminate_all(self):
        """"""
        for worker in self._workers:
            worker.terminate()

        # for thread in self._threads:
        #     try:
        #         thread.terminate()
        #         thread.wait()
        #     except Exception:
        #         pass
        self._queue_workers = deque()
1009330
def stop_workers(self, _join_arbiter=True):
        """"""
        # _join_arbiter is used internally when the arbiter is shutting down
        # the full engine itself. This is because the arbiter thread cannot
        # join itself.
        self._must_stop.set()
        self._workers.stop()
        self._result_notifier.join()
        self._broker.stop()
        if _join_arbiter:
            self._arbiter.join()
        self._reset()
835094
def stop_workers_async(self):
        """"""

        self._started = False
        for worker in self._workers:
            worker.signal_stop()
799178
def stop(self):
        """"""
        if self._progressing:
            self._progressing = False
            self._thread.join()
278679
def pause_all(self):
        """"""
        for alias, service in self._service_objects.items():
            with expects.expect_no_raises(
                    'Failed to pause service "%s".' % alias):
                service.pause()
1231036
def _stop(self):
        
        if self._started.isSet():
            # join threads
            self._pool_getter.join()
            self._pool_putter.join()
            for worker in self.pool:
                worker.join()
            # remove threads  
            del self._pool_putter
            del self._pool_getter
            del self.pool
            # remove results
            self._tasks = []
            self._tasks_tracked = {}
            # virgin variables
            self._stopping.clear()
            self._started.clear()
1144708
public void drainAndHalt()
    {
        Sequence[] workerSequences = getWorkerSequences();
        while (ringBuffer.getCursor() > Util.getMinimumSequence(workerSequences))
        {
            Thread.yield();
        }

        for (WorkProcessor<?> processor : workProcessors)
        {
            processor.halt();
        }

        started.set(false);
    }
81086
public void stop() {
		if (schedulerThread != null) {
			schedulerThread.interrupt();
			try {
				schedulerThread.join(1000);
			} catch (InterruptedException ie) {
			}
//			application.releaseRequest(schedulerThread);
			schedulerThread = null;

			System.out.println(new LogEntry("scheduler thread stopped..."));
		}
	}
695473
def stop(self):
        
        self.shutdown.set()

        for monitor in self.observers:
            monitor.stop()

        self.wind_down()

        for monitor in self.observers:
            monitor.join()

        for thread in self.thread_pool.values():
            thread.join()

        self.work_pool.shutdown()
829710
private function _process_paused() {

        // copy all requests to another variable
        $urls = $this->_requests;

        // while there are URLs to process
        while (!empty($urls)) {

            // get from the entire list of requests as many as specified by the "threads" property
            $this->_requests = array_splice($urls, 0, $this->threads, array());

            // process those requests
            $this->_process();

            // wait for as many seconds as specified by the "pause_interval" property
            if (!empty($urls)) sleep($this->pause_interval);

        }

    }
445377
public void shutdown() {
	    if (shutdown) 
	    {
	        return;
	    }
	    shutdown = true;
	    synchronized (workers) 
	    {
	        for (int i = workers.size(); i > 0; i--) 
	        {
	        	systemExecute(exitTask);
	        }
	        waitConditionStrategy.signalAllWhenBlocking();
	    }
	}
756119
def stop(self, wait=True):
        
        logger.info("Primitive %s stopped.", self)
        StoppableThread.stop(self, wait)
569090
public synchronized void stop() {
    if (!mStopped) {
      mLoggingWorkerThread.interrupt();
      try {
        mLoggingWorkerThread.join();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      } finally {
        mStopped = true;
        mLoggingWorkerThread = null;
        LOG.info("AsyncUserAccessAuditLogWriter thread stopped.");
      }
    }
  }
1149412
private void stop() {
        finish(inputThread);

        try {
            err.flush();
        } catch (IOException e) {
            // ignore
        }
        try {
            out.flush();
        } catch (IOException e) {
            // ignore
        }
        finish(outputThread);
        finish(errorThread);
    }