Callback when a streamer finishes processing.
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)
561688
protected final void finish(Thread t) {
    if (t == null) {
      // nothing to terminate
      return;
    }
    try {
      StreamPumper s = null;
      if (t instanceof ThreadWithPumper) {
        s = ((ThreadWithPumper) t).getPumper();
      }
      if (s != null && s.isFinished()) {
        return;
      }
      if (!t.isAlive()) {
        return;
      }

      if (s != null && !s.isFinished()) {
        s.stop();
      }
      t.join(JOIN_TIMEOUT);
      while ((s == null || !s.isFinished()) && t.isAlive()) {
        t.interrupt();
        t.join(JOIN_TIMEOUT);
      }
    } catch (InterruptedException e) {
      // ignore
    }
  }
1161990
function streamToValue (response, callback) {
  pump(
    response,
    concat((data) => callback(null, data)),
    (err) => {
      if (err) {
        callback(err)
      }
    })
}
347305
def done(self):
        """"""
        # Flush the current future in the local buffer (potential deadlock
        # otherwise)
        try:
            scoop._control.execQueue.remove(self)
            scoop._control.execQueue.socket.sendFuture(self)
        except ValueError as e:
            # Future was not in the local queue, everything is fine
            pass
        # Process buffers
        scoop._control.execQueue.updateQueue()
        return self._ended()
1058129
function streamOutput( callback ) {
	return function(err, filenames) {
		if (err) {
			callback(err, null);
		} else {
			// Create read streams from each input
			var streams = []
			for (var i=0; i<filenames.suffix.length; i++)
				streams.push([
					fs.createReadStream( filenames.basename + filenames.suffix[i]),
					filenames.suffix[i]
				]);
			// Callback with streams
			callback(err, streams);
		}
	}
}
849548
def _toc_fetch_finished(self):
        """"""
        self.cf.remove_port_callback(self.port, self._new_packet_cb)
        logger.debug('[%d]: Done!', self.port)
        self.finished_callback()
932976
static void finished() {
        Object runner = Run.getThreadRunner();
        synchronized(notifyMap) {
            if (notifyMap.get(runner.toString())) {
                Run.fireRunFinished(runner);
            }
        }
    }
1271140
def bind_end(self, stream, future):
		""""""
		if not isinstance(stream, Stream):
			future.set_result(None)
		else:
			stream.pipe(TaskEndTransformer(future))
963919
def acknowledge_streamer(self, index, ack, force):
        """"""

        if index >= len(self.graph.streamers):
            return _pack_sgerror(SensorGraphError.STREAMER_NOT_ALLOCATED)

        old_ack = self.streamer_acks.get(index, 0)

        if ack != 0:
            if ack <= old_ack and not force:
                return _pack_sgerror(SensorGraphError.OLD_ACKNOWLEDGE_UPDATE)

            self.streamer_acks[index] = ack

        current_ack = self.streamer_acks.get(index, 0)
        return self._seek_streamer(index, current_ack)
1115260
function(viewers, req) {
  var stream = bl();

  req.on('data', function(chunk) {
    stream.append(chunk);
  });

  req.on('end', function() {
    var data = stream.toString('ascii');
    console.log('Dispatching: ' + data);
  })
}
525225
def complete(self, stream):
            
            assert not self.is_complete()
            self._marker.addInputPort(outputPort=stream.oport)
            self.stream.oport.schema = stream.oport.schema
            # Update the pending schema to the actual schema
            # Any downstream filters that took the reference
            # will be automatically updated to the correct schema
            self._pending_schema._set(self.stream.oport.schema)

            # Mark the operator with the pending stream
            # a start point for graph travesal
            stream.oport.operator._start_op = True
1293577
public void finished()
  {
    if (tc.isEntryEnabled()) 
      SibTr.entry(tc, "finished");
      
    anycastIHIterator = null;
      
    if (tc.isEntryEnabled()) 
      SibTr.exit(tc, "finished");
  }
440264
void finish() {
		synchronized (this.monitor) {
			if (!isFinished()) {
				this.logger = DeferredLog.replay(this.logger,
						LogFactory.getLog(getClass()));
				this.finished = true;
			}
		}
	}
389899
private void closeStream(final Throwable throwable) {
    if (stream != null) {
      stream.onCompleted();
      stream = null;
    }

    if (isActive.getAndSet(false)) {
      userCallbackExecutor.execute(
          new Runnable() {
            @Override
            public void run() {
              listener.onEvent(
                  null,
                  throwable instanceof FirestoreException
                      ? (FirestoreException) throwable
                      : FirestoreException.apiException(
                          new ApiException(
                              throwable,
                              GrpcStatusCode.of(getStatus(throwable).getCode()),
                              false)));
            }
          });
    }
  }
181209
def on_recv(self, callback):
        '''
        
        '''
        if callback is None:
            return self.stream.on_recv(None)

        @tornado.gen.coroutine
        def wrap_callback(messages):
            payload = yield self._decode_messages(messages)
            if payload is not None:
                callback(payload)
        return self.stream.on_recv(wrap_callback)
1209478
function execCallback(err, stream) {
    if (err) throw err;
    stream
        .on('close', function (code, signal) { console.log('Stream closed with code ' + code + ' and signal ' + signal); conn.end() })
        .on('data', function (data) { console.log(data); })
        .stderr.on('data', function (err) { console.log('!!!!!!!!!!!!!! Error: ' + err); });
}
583042
function(err)
  {
    // we're done loading
    self._isLoading = false;

    // emit an event to notify subscribers
    self.emit('loadcomplete', err, self);

    // invoke the callback if one was specified
    if (Util.isFunction(callback))
    {
      callback(err, self);
    }
  }