Special hot reload with asyncData(context)
341809
function hotReloadAPI(_app) {
  if (false) return;

  var $components = [];
  var $nuxt = _app.$nuxt;

  while ($nuxt && $nuxt.$children && $nuxt.$children.length) {
    $nuxt.$children.forEach(function (child, i) {
      if (child.$vnode.data.nuxtChild) {
        var hasAlready = false;
        $components.forEach(function (component) {
          if (component.$options.__file === child.$options.__file) {
            hasAlready = true;
          }
        });
        if (!hasAlready) {
          $components.push(child);
        }
      }
      $nuxt = child;
    });
  }

  $components.forEach(addHotReload.bind(_app));
}
1016206
def reload(self):
        
        realData = self.load()
        self.clear()
        self.update(realData)
205377
private function syncDataInternal()
    {
        Console::startProgress(0, $this->getOffsetTotal(), 'Fetch: ' . $this->getName() . ' ');
        $this->_contentRowsCount = 0;

        $dataChunk = [];
        for ($i = 0; $i < $this->getOffsetTotal(); ++$i) {
            $requestData = $this->request($i);

            if (!$requestData) {
                continue;
            }

            if (0 === $i % $this->build->syncRequestsCount) {
                $inserted = $this->insertData($dataChunk);
                $this->_contentRowsCount += $inserted;
                $dataChunk = [];
            }

            Console::updateProgress($i + 1, $this->getOffsetTotal());

            $dataChunk = array_merge($requestData, $dataChunk);
            gc_collect_cycles();
        }

        if (!empty($dataChunk)) {
            $this->insertData($dataChunk);
        }

        Console::endProgress();
    }
608342
def Reload(self):
    """"""
    logger.info('Beginning DbImportMultiplexer.Reload()')
    # Defer event sink creation until needed; this ensures it will only exist in
    # the thread that calls Reload(), since DB connections must be thread-local.
    if not self._event_sink:
      self._event_sink = self._CreateEventSink()
    # Use collections.deque() for speed when we don't need blocking since it
    # also has thread-safe appends/pops.
    loader_queue = collections.deque(six.itervalues(self._run_loaders))
    loader_delete_queue = collections.deque()

    def batch_generator():
      while True:
        try:
          loader = loader_queue.popleft()
        except IndexError:
          return
        try:
          for batch in loader.load_batches():
            yield batch
        except directory_watcher.DirectoryDeletedError:
          loader_delete_queue.append(loader)
        except (OSError, IOError) as e:
          logger.error('Unable to load run %r: %s', loader.subdir, e)

    num_threads = min(self._max_reload_threads, len(self._run_loaders))
    if num_threads <= 1:
      logger.info('Importing runs serially on a single thread')
      for batch in batch_generator():
        self._event_sink.write_batch(batch)
    else:
      output_queue = queue.Queue()
      sentinel = object()
      def producer():
        try:
          for batch in batch_generator():
            output_queue.put(batch)
        finally:
          output_queue.put(sentinel)
      logger.info('Starting %d threads to import runs', num_threads)
      for i in xrange(num_threads):
        thread = threading.Thread(target=producer, name='Loader %d' % i)
        thread.daemon = True
        thread.start()
      num_live_threads = num_threads
      while num_live_threads > 0:
        output = output_queue.get()
        if output == sentinel:
          num_live_threads -= 1
          continue
        self._event_sink.write_batch(output)
    for loader in loader_delete_queue:
      logger.warn('Deleting loader %r', loader.subdir)
      del self._run_loaders[loader.subdir]
    logger.info('Finished with DbImportMultiplexer.Reload()')
1122032
function onData(data) {

		data = data.toString("ascii");
		bufferedData += data;

		if (debug) console.log("Server: " + util.inspect(data));

		if (checkResp === true) {

			if (bufferedData.substr(0, 3) === "+OK") {

				checkResp = false;
				response = true;

			} else if (bufferedData.substr(0, 4) === "-ERR") {

				checkResp = false;
				response = false;

			// The following is only used for SASL
			} else if (multiline === false) {

				checkResp = false;
				response = true;

			}
		}

		if (checkResp === false) {

			if (multiline === true && (response === false || bufferedData.substr(bufferedData.length-5) === "\r\n.\r\n")) {

				// Make a copy to avoid race conditions
				var responseCopy = response;
				var bufferedDataCopy = bufferedData;

				response = null;
				checkResp = true;
				multiline = false;
				bufferedData = "";

				callback(responseCopy, bufferedDataCopy);

			} else if (multiline === false) {

				// Make a copy to avoid race conditions
				var responseCopy = response;
				var bufferedDataCopy = bufferedData;

				response = null;
				checkResp = true;
				multiline = false;
				bufferedData = "";

				callback(responseCopy, bufferedDataCopy);

			}
		} 
	}
1334903
function (context, next) {
        this._cache.read(context.cached._id, function (err, doc) {
            if (err || !doc)
                return next(err || new Error('Critical failure! A cache entry has mysteriously disappeared...'));
            context.cached = doc;
            // this should happen only for internal phantom errors, not client javascript errors.
            if (context.cached.error) {
                this.logger.warn('The last try gave us an error, try to recompute.', { error: context.cached.error });
                context.options.force = true;
                context.options.wait = true;
            }
            next(null);
        });
    }
608464
function reactRedata(loader, shouldReload, mapper) {
    // Curry redata with provided information, only the redata initial ctx is missing.
    return redataComponent.bind(null, redata.bind(null, loader, shouldReload, mapper));
}
400016
async def run_with_reloader(loop, coroutine, cleanup=None, *args, **kwargs):
    

    clear_screen()
    print("🤖  Running in debug mode with live reloading")
    print("    (don't forget to disable it for production)")

    # Create watcher
    handler = Handler(loop)
    watcher = Observer()

    # Setup
    path = realpath(os.getcwd())
    watcher.schedule(handler, path=path, recursive=True)
    watcher.start()

    print("    (watching {})".format(path))

    # Run watcher and coroutine together
    done, pending = await asyncio.wait(
        [coroutine, handler.changed], return_when=asyncio.FIRST_COMPLETED
    )

    # Cleanup
    cleanup and cleanup()
    watcher.stop()

    for fut in done:
        # If change event, then reload
        if isinstance(fut.result(), Event):
            print("Reloading...")
            reload()
546852
function hotDownloadManifest() {
		var filename = require("path").join(__dirname, $hotMainFilename$);
		return new Promise(function(resolve, reject) {
			require("fs").readFile(filename, "utf-8", function(err, content) {
				if (err) return resolve();
				try {
					var update = JSON.parse(content);
				} catch (e) {
					return reject(e);
				}
				resolve(update);
			});
		});
	}
1102193
function dataWatchFn(newData, oldData) {
                        if (newData !== oldData){
                            if (!scope._config.disabled) {
                                scope._config.refreshDataOnly ? scope.api.update() : scope.api.refresh(); // if wanted to refresh data only, use update method, otherwise use full refresh.
                            }
                        }
                    }
1322015
def run_with_reloader(main_func, extra_files=None, interval=1):
    """"""
    import signal
    signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))
    if os.environ.get('WERKZEUG_RUN_MAIN') == 'true':
        thread.start_new_thread(main_func, ())
        try:
            reloader_loop(extra_files, interval)
        except KeyboardInterrupt:
            return
    try:
        sys.exit(restart_with_reloader())
    except KeyboardInterrupt:
        pass
1344255
public void waitForAsyncFlush() {
    long numAdded = asyncBatchesAdded.get();

    synchronized (this) {
      while (numAdded > asyncBatchesProcessed) {
        try {
          wait();
        } catch (InterruptedException e) {
          throw new RuntimeException(e);
        }
      }
    }
  }
450793
def reload(self, reload_timeout=300, save_config=True):
        
        self.log("Reload not implemented on {} platform".format(self.platform))
993504
async function reload() {
  const requestOptions = {
    hostname: 'localhost',
    port: 8081,
    path: '/reloadapp',
    method: 'HEAD',
  };

  const req = http.request(requestOptions, () => {
    clear();
    logger.done('Sent reload request');
    req.end();
  });

  req.on('error', e => {
    clear();
    const error = e.toString();
    if (error.includes('connect ECONNREFUSED')) {
      logger.error(`Reload request failed. Make sure Haul is up.`);
    } else {
      logger.error(e);
    }
  });

  req.end();
}
788337
def refresh(self, reloadData=False, force=False):
        
        if not (self.isVisible() or force):
            self._refreshTimer.start()
            return
        
        if self.isLoading():
            return
        
        if reloadData:
            self.refreshQueryRecords()
        
        # cancel current work
        self._refreshTimer.stop()
        self.worker().cancel()
        
        if self._popup:
            self._popup.close()
        
        # grab the record set
        currset = self.currentRecordSet()
        
        self.worker().setBatched(self.isPaged())
        self.worker().setBatchSize(self.pageSize())
        
        # group the information
        if self._searchTerms:
            currset.setGroupBy(None)
            pageSize = 0
        
        # work with groups
        elif self.groupBy() and self.isGroupingActive():
            currset.setGroupBy(self.groupBy())
        
        # work with batching
        else:
            currset.setGroupBy(None)
        
        # order the information
        if self.order():
            currset.setOrdered(True)
            currset.setOrder(self.order())
        
        # for larger queries, run it through the thread
        if self.useLoader():
            loader = XLoaderWidget.start(self)
        
        # specify the columns to load
        if self.specifiedColumnsOnly():
            currset.setColumns(map(lambda x: x.name(),
                                   self.specifiedColumns()))
        
        self._loadedColumns = set(self.visibleColumns())
        
        if self.isThreadEnabled() and currset.isThreadEnabled():
            self.worker().setPreloadColumns(self._preloadColumns)
            self.loadRequested.emit(currset)
        else:
            QApplication.setOverrideCursor(Qt.WaitCursor)
            self.worker().loadRecords(currset)
            QApplication.restoreOverrideCursor()
552869
public void newDataReady(DataType data) {
		ArrayList<Runnable> list;
		synchronized (this) {
			if (end) throw new IllegalStateException("method endOfData already called, method newDataReady is not allowed anymore");
			waitingData.addLast(data);
			list = listeners;
			listeners = null;
		}
		if (list != null) {
			for (Runnable listener : list) listener.run();
		}
		// notify after listeners
		synchronized (this) {
			this.notify();
		}
	}
283392
def reload_source(self, name, init_source=True):
        """"""

        for c in self.components:
            c.reload_source(name)

        if init_source:
            self._init_source(name)

        self.like.model = self.like.components[0].model