Abandon or reject (if reason provided) all the buffered requests.
505025
function(reason) {
        if (reason) {
          for (var i = 0; i < buffer.length; ++i) {
            buffer[i].deferred.reject(reason);
          }
        }
        buffer = [];
      }
1067328
def reject(self, timeout=1):
        
        log(_("checking that input was rejected..."))
        try:
            self._wait(timeout)
        except Failure as e:
            if not isinstance(e.__cause__, TIMEOUT):
                raise
        else:
            raise Failure(_("expected program to reject input, but it did not"))
        return self
529085
public void invalidate ()
  {
    if (m_bInvalidated)
      throw new IllegalStateException ("Request scope already invalidated!");
    m_bInvalidated = true;

    if (m_aServletContext != null)
    {
      final ServletRequestEvent aSRE = new ServletRequestEvent (m_aServletContext, this);
      for (final ServletRequestListener aListener : MockHttpListener.getAllServletRequestListeners ())
        aListener.requestDestroyed (aSRE);
    }

    close ();
    clearAttributes ();
  }
1186171
public static void endRequest() {
        final List<RequestScopedItem> result = CACHE.get();
        if (result != null) {
            CACHE.remove();
            for (final RequestScopedItem item : result) {
                item.invalidate();
            }
        }
    }
1063168
public function cleanup()
    {
        $this->requestId = null;
        $this->result    = null;
        $this->setState(self::READY);
    }
573726
function() {
        if (finished === true) {
            return;
        }
        finished = true;
        req.removeAllListeners();
        if (response !== null) {
            response.removeAllListeners();
        }
        callback.apply(null, arguments);
    }
192757
def abort_request(self, request):
        """"""
        self.timedout = True
        try:
            request.cancel()
        except error.AlreadyCancelled:
            return
1050522
protected void cleanup() {
		int closed = 0;
		SendBuffer buffer;
		synchronized (buffers) {
			int buffersToClose = buffers.size() - maxConnections;
			if (buffersToClose < 1) {
				return;
			}
			Iterator<SendBuffer> i = buffers.values().iterator();
			while (i.hasNext()) {
				buffer = i.next();
				if (buffer.tryToClose()) {
					i.remove();
					closed++;
					if (closed >= buffersToClose) {
						return;
					}
				}
			}
		}
	}
493550
protected void process(Collection<R> requests) {
        for(;;) {
            while(!requests.isEmpty()) {
                removeAndProcess(requests); // remove matching requests and process them
            }
            lock.lock();
            try {
                if(requests.isEmpty()) {
                    setProcessing(false);
                    return;
                }
            }
            finally {
                lock.unlock();
            }
        }
    }
1317457
def end_request(self):
        """"""
        if not self._chunked:
            return
        trailers = [(n, get_header(self._headers, n)) for n in self._trailer] \
                        if self._trailer else None
        ending = create_chunked_body_end(trailers)
        self._protocol.writer.write(ending)
632422
def do_discard(self, line):
        

        def f(p, args):
            print(p.discard_changes())

        self._request(line, f)
857246
function reject(err, async) {
    err = toErr(err);
    if (async) {
        return Promise.reject(err);
    } else {
        throw err;
    }
}
535247
public void discardBody() {
        try (InputStream in = body) {
            InputStreams.discardAll(in);
        } catch (IOException e) {
            throw new RequestsException(e);
        } finally {
            close();
        }
    }
381021
private void flushIfPossible(boolean flushAll) throws IOException {
    if (flushAll) {
      flushLock.lock();
    } else if (pendingRequests.isEmpty() || !flushLock.tryLock()) {
      return;
    }
    try {
      do {
        flushPendingRequests();
        if (flushAll) {
          awaitRequestsCompletion();
        }
      } while (flushAll && (!pendingRequests.isEmpty() || !responseFutures.isEmpty()));
    } finally {
      flushLock.unlock();
    }
  }
840264
def _accept_loop(self):
        """"""
        self._listening_sock.setblocking(0)
        while not self._stopped and not _shutting_down:
            try:
                # Wait a short time to accept.
                if select.select([self._listening_sock.fileno()], [], [], 1):
                    client, client_addr = self._listening_sock.accept()
                    client.setblocking(True)
                    self._log('connection from %s' % format_addr(client_addr))
                    server_thread = threading.Thread(
                        target=functools.partial(
                            self._server_loop, client, client_addr))

                    # Store weakrefs to the thread and socket, so we can
                    # dispose them in stop().
                    self._server_threads[server_thread] = None
                    self._server_socks[client] = None

                    server_thread.daemon = True
                    server_thread.start()
            except socket.error as error:
                if error.errno not in (
                    errno.EAGAIN, errno.EBADF, errno.EWOULDBLOCK):
                    raise
            except select.error as error:
                if error.args[0] == errno.EBADF:
                    # Closed.
                    break
                else:
                    raise
842053
public void cancelAllRequests()
  {
    try
    {
      this.forceFlushAtTarget();
    }
    catch(SIMPRuntimeOperationFailedException e)
    {
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.runtime.RemoteConsumerReceiver.cancelAllRequests",
        "1:316:1.47",
        this); 
        
      SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
        new Object[] { "com.ibm.ws.sib.processor.runtime.RemoteConsumerReceiver.cancelAllRequests", 
                       "1:321:1.47", 
                       SIMPUtils.getStackTrace(e) });
      SibTr.exception(tc, e);
    }    
  }
354074
def reject_all_values_if_none(source_list)
      if source_list.length > 1
        source_list.reject { |value| value == NONE }
      else
        source_list
      end
    end