Cancels any pending Future from a take() operation.
180228
public void cancelPendingTake() {
        CompletableFuture<Queue<T>> pending;
        synchronized (this.contents) {
            pending = this.pendingTake;
            this.pendingTake = null;
        }

        // Cancel any pending poll request.
        if (pending != null) {
            pending.cancel(true);
        }
    }
227889
def cancelPendingResult( self, jobid ):
        """"""
        if jobid in self._pending.keys():
            k = self._pending[jobid]
            del self._pending[jobid]
            if k in self._results.keys():
                rs = self._results[k]
                j = rs.index(jobid)
                del rs[j]
            else:
                # we've screwed-up the internal data structures
                raise RuntimeError('Internal structure error for {j} -> {ps}'.format(j = jobid,
                                                                                     ps = k))
        else:
            # no such job
            # sd: should this just fail silently?
            raise KeyError('No pending result with id {j}'.format(j = jobid))
1177181
function cancel(opt_reason) {
    if (!isPending()) {
      return;
    }

    if (opt_canceller) {
      opt_reason = opt_canceller(opt_reason) || opt_reason;
    }

    reject(opt_reason);
  }
181608
void stop() {
        ScheduledFuture<?> future = this.rollupFuture.getAndSet(null);
        if (future != null && !future.isDone() && !future.isCancelled()) {
            // Stop running the scheduled job, letting any currently running rollup finish ...
            future.cancel(false);
        }
    }
824219
def cancel(self):
        '''
        
        '''
        if (not self.cancelled) and (self._fn is not None):
            self._cancelled = True
            self._drop_fn()
157440
public void cancel() { //d583637, F73234
        synchronized (ivCancelLock) { //d601399
            ivIsCanceled = true;
            if (ivScheduledFuture != null)
                ivScheduledFuture.cancel(false);
            ivCache = null;
            ivElements = null;
        }
    }
589099
@Trivial
    private final void purgeFutures() {
        for (Iterator<ScheduledFuture<?>> it = futures.iterator(); it.hasNext();)
            if (it.next().isDone())
                it.remove();
    }
1335329
public void unqueue(final PoolWaitFuture<PoolableObject<V>> future) {
		if (future == null) return;
		waiting.remove(future);
	}
967629
def cancel(self):
        
        super(ProcessMapFuture, self).cancel()

        return any(tuple(f.cancel() for f in self._futures))
30763
def cancel(self):
        
        conn = self._assert_open()
        conn._try_activate_cursor(self)
        self._session.cancel_if_pending()
816047
def cancel(self):
        """"""
        d = self.request('post', self.instance_url() + '/cancel')
        return d.addCallback(self.refresh_from)
99659
def pop_result(self, key):
        """"""
        self.pending_callbacks.remove(key)
        return self.results.pop(key)
995781
@Override
    public void stop(Future<Void> stopFuture) throws Exception {
        // Stop the real verticle
        if (realVerticle != null) {
            realVerticle.stop(stopFuture);
            realVerticle = null;
        }
    }
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()
64584
def cancel(self):
        
        self._transaction = False
        try:
            cancel = self._con.cancel
        except AttributeError:
            pass
        else:
            cancel()
976807
private void cancelRetryFuture() {
        if (retryFuture != null && !retryFuture.isDone()) {
            retryFuture.cancel(true);
        }
        retryFuture = null;
    }
388733
public T take() throws Throwable {
    dataLock.lock();      
    try {
      while(data == null && error == null) {
        try {
          availableCondition.await();
        } catch(InterruptedException e) {
          // ignore and re-loop in case of spurious wake-ups
        }
      }
      
      // should only get to here if data or error is non-null
      return getAndClearUnderLock();
    } finally {
      dataLock.unlock();
    }
  }