Resumes all the worker threads.
467
def resume(self):
        
        for child in chain(self.consumers.values(), self.workers):
            child.resume()
1031077
def run(self):
        
        self._capture_signals()
        self._start_monitor()
        try:
            while True:
                if not self._run_worker():
                    self._wait_for_changes()
                time.sleep(self.reload_interval)
        except KeyboardInterrupt:
            pass
        finally:
            self._stop_monitor()
            self._restore_signals()
        sys.exit(1)
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()
329027
public function resumeRecv()
    {
        if ($this->_isPaused === true) {
            Worker::$globalEvent->add($this->_socket, EventInterface::EV_READ, array($this, 'baseRead'));
            $this->_isPaused = false;
            $this->baseRead($this->_socket, false);
        }
    }
599696
def start_workers(self):
        """"""

        if self._started:
            raise InternalError("The method start() was called twice on a BaseRunnable object.")

        self._started = True

        for worker in self._workers:
            worker.start()
185251
function resetWorker() {
    sigqueue = [];
    mastersigs.forEach(process.removeAllListeners.bind(process));
    process.removeAllListeners('exit');
    process.env.TIAMAT = '1';
  }
1173998
private void doInterruptAllWaitingThreads() {
    	//Interrupt all the threads
    	for (int i=0; i<nThreads; i++) {
    		threads[i].interrupt();
    	}
    	
    	synchronized(lock) {
    		lock.notify();
    	}
    }
466120
@CommandArgument
  public void stop() {
    System.out.println("Stopping worker");
    worker.shutdown();
    workerThread.interrupt();
    try {
      workerThread.join();
    } catch (InterruptedException e) {
      logger.warn("Joining to worker thread interrupted", e);
    }
    worker = null;
    workerThread = null;
    taskProgressStates = null;
  }
928368
public void start() {
		this.workerThread = new Thread(this);
		System.out.println("starting worker thread");
		this.workerThread.start();
		System.out.println("worker thread started");
	}
431448
@Override
    public void reset() {
        // just replace accumulator, gc will do the rest
        accumulator = new ThreadLocal<>();

        // resetting this counter too
        workersCounter.set(0);

        // reset indexes too
        index = new ThreadLocal<>();

        // throw away message queues
        for (int i = 0; i < parties; i++) {
            messages.get(i).clear();
        }
    }
1103770
def run(self):
        """"""
        while True:
            if self._dismissed.isSet():
                # we are dismissed, break out of loop
                break

            # get next work request.
            request = self._requests_queue.get()
            # print 'Worker thread %s running request %s' %(self, request)

            if self._dismissed.isSet():
                # we are dismissed, put back request in queue and exit loop
                self._requests_queue.put(request)
                break
            try:
                result = request.callable(*request.args, **request.kwds)
                if request.callback:
                    request.callback(request, result)
                del result
                self._requests_queue.task_done()
            except:
                request.exception = True
                if request.exc_callback:
                    request.exc_callback(request)
                self._requests_queue.task_done()
            finally:
                request.self_destruct()
1174344
def join(self):
        """"""
        for thread in self.worker_threads:
            thread.join()
        WorkerThread.join(self)
156685
def _start_thread(self):
        """"""
        self._stopping_event = Event()
        self._enqueueing_thread = Thread(target=self._enqueue_batches, args=(self._stopping_event,))
        self._enqueueing_thread.start()
907214
public function restart()
    {
        $count = count($this->processes);

        $this->scale(0);

        $this->scale($count);
    }
1329111
def _clean(self):
        """"""
        if self._workers:
            for w in self._workers:
                if w.is_finished():
                    self._workers.remove(w)
        else:
            self._current_worker = None
            self._timer.stop()
417941
public void doRefreshAll() {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				// collect the current state inside the GUI thread
				final Object state[] = new Object[ algCookies.length ];
				for( int i = 0; i < state.length; i++ ) {
					state[i] = algCookies[i].get(algBoxes[i].getSelectedIndex());
				}
				// create a new thread to process this change
				new Thread() {
					public void run() {
						setActiveGUI(false);
						refreshAll(state);
						setActiveGUI(true);
					}
				}.start();
			}});
	}
935537
def stop(self):
        
        if not self.stopped():
            self._stop.set()
            for worker in self._workers:
                worker.join()