Handle stream update.
340912
def _on_stream_update(self, data):
        """"""
        self._streams[data.get('id')].update(data.get('stream'))
        _LOGGER.info('stream %s updated', self._streams[data.get('id')].friendly_name)
        for group in self._groups.values():
            if group.stream == data.get('id'):
                group.callback()
1270529
function handleUpdateFile(response) {

        var path = response.path,
            type = response.type,
            $deferredHints = getPendingRequest(path, OFFSET_ZERO, type);

        if ($deferredHints) {
            $deferredHints.resolve();
        }
    }
259468
def handle_input(self):
        """"""
        difference = self.check_state()
        if not difference:
            return
        self.events = []
        self.handle_new_events(difference)
        self.update_timeval()
        self.events.append(self.sync_marker(self.timeval))
        self.write_to_pipe(self.events)
507053
def handle(self):
        
        logger = StreamHandler.logger
        logger.debug("handling requests with message handler %s " % StreamHandler.message_handler.__class__.__name__)

        message_handler = StreamHandler.message_handler

        try:
            while True:
                logger.debug('waiting for more data')
                if not message_handler.handle(self.request, StreamHandler.BUFFER_SIZE):
                    break

            logger.warning("connection closed from %s" % (self.client_address[0]))
            self.request.close()
        except:
            logger.exception("connection closed from %s" % (self.client_address[0]))
        finally:
            self.request.close()
1135749
def _handle_stream(self, stream, address):
        """"""
        try:
            assert get_thread_ident() == self.ioloop_thread_id
            stream.set_close_callback(partial(self._stream_closed_callback,
                                              stream))
            # Our message packets are small, don't delay sending them.
            stream.set_nodelay(True)
            stream.max_write_buffer_size = self.MAX_WRITE_BUFFER_SIZE

            # Abuse IOStream object slightly by adding 'address' and 'closing'
            # attributes. Use nasty prefix to prevent naming collisions.
            stream.KATCPServer_address = address
            # Flag to indicate that no more write should be accepted so that
            # we can flush the write buffer when closing a connection
            stream.KATCPServer_closing = False

            client_conn = self.client_connection_factory(self, stream)
            self._connections[stream] = client_conn
            try:
                yield gen.maybe_future(self._device.on_client_connect(client_conn))
            except Exception:
                # If on_client_connect fails there is no reason to continue
                # trying to handle this connection. Try and send exception info
                # to the client and disconnect
                e_type, e_value, trace = sys.exc_info()
                reason = "\n".join(traceback.format_exception(
                    e_type, e_value, trace, self._tb_limit))
                log_msg = 'Device error initialising connection {0}'.format(reason)
                self._logger.error(log_msg)
                stream.write(str(Message.inform('log', log_msg)))
                stream.close(exc_info=True)
            else:
                self._line_read_loop(stream, client_conn)
        except Exception:
            self._logger.error('Unhandled exception trying '
                               'to handle new connection', exc_info=True)
840002
def listen_for_updates(self):
        """"""
        self.toredis.subscribe(self.group_pubsub, callback=self.callback)
898488
def update(self, update_finished_cb):
        """"""
        if not self._update_finished_cb:
            self._update_finished_cb = update_finished_cb
            self.valid = False
            logger.debug('Updating content of memory {}'.format(self.id))
            # Start reading the header
            self.mem_handler.read(self, 0, 11)
259941
public void updateStream(String scope, String streamName, Duration latency) {
        DYNAMIC_LOGGER.incCounterValue(globalMetricName(UPDATE_STREAM), 1);
        DYNAMIC_LOGGER.incCounterValue(UPDATE_STREAM, 1, streamTags(scope, streamName));
        updateStreamLatency.reportSuccessValue(latency.toMillis());
    }
350369
def _on_group_stream_changed(self, data):
        """"""
        self._groups.get(data.get('id')).update_stream(data)
973537
def _handle_streamer_finished(self, index, succeeded, highest_ack):
        """"""

        self._logger.debug("Rolling back streamer %d after streaming, highest ack from streaming subsystem was %d", index, highest_ack)
        self.acknowledge_streamer(index, highest_ack, False)
302715
void fireUpdated(Object source) {
		if (updateDisable) {
			return;
		}
		
		if (source == maxSpinner) {
			if (getMax() < getMin()) {
				setMin(getMax());
			}
		}
		if (source == minSpinner) {
			if (getMax() < getMin()) {
				setMax(getMin());
			}
		}
		
		for (int i=0;i<listeners.size();i++) {
			((InputPanelListener) listeners.get(i)).minMaxUpdated(this);
		}
	}
285310
function handleUpdate(req, res) {
	var id = req.params.id;
	var value = req.params.value;
	addCache(id, value);
	data = {id:id, value:value};
	console.log('Update:', id, value, data);
	io.sockets.emit('update', data);	// or broadcastJSONUpdate
	res.send(value);
}
299865
private void updateStreamReadWindow() throws Http2Exception {
        if (currentFrame instanceof FrameData) {
            long frameSize = currentFrame.getPayloadLength();
            streamReadWindowSize -= frameSize; // decrement stream read window
            muxLink.connectionReadWindowSize -= frameSize; // decrement connection read window

            // if the stream or connection windows become too small, update the windows
            // TODO: decide how often we should update the read window via WINDOW_UPDATE
            if (streamReadWindowSize < (muxLink.maxReadWindowSize / 2) ||
                muxLink.connectionReadWindowSize < (muxLink.maxReadWindowSize / 2)) {

                int windowChange = (int) (muxLink.maxReadWindowSize - this.streamReadWindowSize);
                Frame savedFrame = currentFrame; // save off the current frame
                if (!this.isStreamClosed()) {
                    currentFrame = new FrameWindowUpdate(myID, windowChange, false);
                    writeFrameSync();
                    currentFrame = savedFrame;
                }
                long windowSizeIncrement = muxLink.getRemoteConnectionSettings().getMaxFrameSize();
                FrameWindowUpdate wuf = new FrameWindowUpdate(0, (int) windowSizeIncrement, false);
                this.muxLink.getStream(0).processNextFrame(wuf, Direction.WRITING_OUT);
            }
        }
    }
521360
function stream (input, value) {
  value.on('data', data => input.push(data))
  value.on('error', err => error(input, err))
  value.on('end', () => input.push(null))
}
222305
public function handleRead()
    {
        try
        {
            if (!$this->reading)
            {
                return;
            }

            $length = $this->bufferSize;
            $ret = fread($this->resource, $length);

            if ($ret === false)
            {
                $this->emit('error', [ $this, new ReadException('Error occurred while reading from the stream resource.') ]);
                return;
            }

            if ($ret !== '')
            {
                $this->emit('data', [ $this, $ret ]);

                if (strlen($ret) < $length)
                {
                    $this->reading = false;
                    $this->emit('end', [ $this ]);
                }
            }
        }
        catch (Error $ex)
        {
            $this->emit('error', [ $this, $ex ]);
        }
        catch (Exception $ex)
        {
            $this->emit('error', [ $this, $ex ]);
        }
    }
723127
def wait(self) -> None:
        """"""
        if self._out_thread.is_alive():
            self._out_thread.join()
        if self._err_thread.is_alive():
            self._err_thread.join()

        # Handle case where the process ended before the last read could be done.
        # This will return None for the streams that weren't pipes.
        out, err = self._proc.communicate()

        if out:
            self._write_bytes(self._stdout, out)
        if err:
            self._write_bytes(self._stderr, err)
1318172
function handleData(state, data) {
    debug('Read data from ', streamName(this));

    try {
      addData.call(state, data);
    } catch (err) {
      debug(`Error adding data from ${streamName(this)}`, err);
      reject(err);
      done();
      return;
    }

    if (options.incremental) {
      doCompare(options.incremental, CompareType.incremental);
    }
  }