Resets the generator by stopping all processes
488872
def reset(self):
        """"""
        self.alive.value = False
        qsize = 0
        try:
            while True:
                self.queue.get(timeout=0.1)
                qsize += 1
        except QEmptyExcept:
            pass
        print("Queue size on reset: {}".format(qsize))
        for i, p in enumerate(self.proc):
            p.join()
        self.proc.clear()
581546
def reset_generation(self):
        """"""
        with self._lock:
            self._generation = Generation.NO_GENERATION
            self.rejoin_needed = True
            self.state = MemberState.UNJOINED
993869
def reset(self):
        
        self._variables_shim = {}
        self._executable = None
        self._bitstrings = None

        self.status = 'connected'
162096
public void reset() {
        synchronized (lock) {
            released = false;
            e = null;
            result = null;
            runningThreadId = null;
        }
    }
367744
def reset(self):
        """"""

        response_npts = int(self.aitime*self.aifs)
        try:
            self.aitask = AITaskFinite(self.aichan, self.aifs, response_npts, trigsrc=self.trigger_dest)
            new_gen = self.reset_generation(u"ai/StartTrigger")
        except:
            print u'ERROR! TERMINATE!'
            self.daq_lock.release()
            self.stop()
            raise

        self.daq_lock.release()
        return new_gen
14978
public void reset() {
        done = false;
        for (int i = 0; i < current.length; ++i) {
            current[i] = 0;
        }
    }
542804
def _unwindGenerator(self, generator, _prev=None):
        """"""
        while True:
            if _prev:
                ret, _prev = _prev, None
            else:
                try:
                    ret = next(generator)
                except StopIteration:
                    break

            if isinstance(ret, Request):
                if ret.callback:
                    warnings.warn("Got a request with callback set, bypassing "
                                  "the generator wrapper. Generator may not "
                                  "be able to resume. %s" % ret)
                elif ret.errback:
                    # By Scrapy defaults, a request without callback defaults to
                    # self.parse spider method.
                    warnings.warn("Got a request with errback set, bypassing "
                                  "the generator wrapper. Generator may not "
                                  "be able to resume. %s" % ret)
                else:
                    yield self._wrapRequest(ret, generator)
                    return

            # A request with callbacks, item or None object.
            yield ret
1100565
public void reset() {
    w.lock();
    try {
      for (JedisPool pool : nodes.values()) {
        try {
          if (pool != null) {
            pool.destroy();
          }
        } catch (Exception e) {
          // pass
        }
      }
      nodes.clear();
      slots.clear();
    } finally {
      w.unlock();
    }
  }
1107432
protected void reset() {
	done.set(false);
	performing.set(false);
	cancelled.set(false);
	estimated.set(0L);
    }
473030
public function reset(){
        $this->setId(null);
        $this->shutdown = false;
        $this->getLogger()->notice('Worker {worker} reset', array('worker' => $this));
    }
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()
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()
628854
def reset():
    
    global MAIN_DIR, TEMP_DIR, DOWNLOAD_DIR, SAVESTAT_DIR, LOGFILE_PATH, USING_CORES, LOG_LEVEL, DISABLE_TQDM, \
        SAVE_STATE_VERSION
    MAIN_DIR = Path('./')
    TEMP_DIR = MAIN_DIR.joinpath(Path('temp/'))
    DOWNLOAD_DIR = MAIN_DIR.joinpath(Path('downloads/'))
    SAVESTAT_DIR = MAIN_DIR.joinpath(Path('savestates/'))
    LOGFILE_PATH = MAIN_DIR.joinpath(Path('UniDown.log'))

    USING_CORES = 1
    LOG_LEVEL = 'INFO'
    DISABLE_TQDM = False

    SAVE_STATE_VERSION = Version('1')
113225
def reset(self):
        
        self.reached_limit = False
        self.count = 0
        self.seen.clear()
575737
public function reset()
    {
        $this->_iterator = null;
        $this->_batch = null;
        $this->_value = null;
        $this->_key = null;
    }
728399
function _clearGeneratorConfig(app, generator) {
  if (generator === '*') {
    globalConfig.removeAll();
  } else {
    globalConfig.remove(generator);
  }

  console.log('Global config has been successfully cleared');
  app.navigate('home');
}
364400
def shutdown(self):
        
        for connection in self.connections.copy():
            connection.shutdown()

        self.connections = None

        self.context.term()
        self.context = None
        if self.trigger:
            try:
                self.reactor.removeSystemEventTrigger(self.trigger)
            except Exception:
                pass