Cancel the timer created by sink_ object with ID equal to id_.
10336
public void cancelTimer(IPollEvents sink, int id)
    {
        assert (Thread.currentThread() == worker);

        TimerInfo copy = new TimerInfo(sink, id);
        //  Complexity of this operation is O(n). We assume it is rarely used.

        TimerInfo timerInfo = timers.find(copy);
        if (timerInfo != null) {
            // let's defer the removal during the loop
            timerInfo.cancelled = true;
        }
    }
275974
def cancel(self):
        
        expr = self
        while True:
            arg = expr.args[0]
            if not isinstance(arg, self.__class__):
                return expr
            expr = arg.args[0]
            if not isinstance(expr, self.__class__):
                return expr
463975
function delay(bench, fn) {
      bench._timerId = _.delay(fn, bench.delay * 1e3);
    }
933355
def cancel_requests(self):
        """"""
        self._timer.stop()
        self._job = None
        self._args = None
        self._kwargs = None
759881
def stop_refreshing_token(self):
        
        with self.lock:
            self.timer_stopped = True
            self.timer.cancel()
1304881
function (id) {
        // Stop javascript timer & remove from timer list
        if (id && timers[id]) {
            window.clearInterval(timers[id].timer);
            removeListeners(timers[id].listeners);
            delete timers[id];

            if (eventTimerId && Object.keys(timers).length === 0) {
                // No more watchers, so stop firing 'devicemotion' events
                window.clearInterval(eventTimerId);
                eventTimerId = null;
            }
        }
    }
816047
def cancel(self):
        """"""
        d = self.request('post', self.instance_url() + '/cancel')
        return d.addCallback(self.refresh_from)
1095093
@Override
  public void cancel(Serializable f) {
    if (f != null && f instanceof TimerTaskHandle) {
      TimerTaskHandle timerTaskHandle = (TimerTaskHandle) f;
      if (timerTaskHandle.future != null) {
        logger.debug("Cancelling timer with id [{}] and delay [{}]", timerTaskHandle.id, timerTaskHandle.future.getDelay(TimeUnit.MILLISECONDS));
        if (executor.remove((Runnable) timerTaskHandle.future)) {
          timerTaskHandle.future.cancel(false);
          returnTimerTaskHandle(timerTaskHandle);
        }
      }
    }
  }
1131138
public function cancelTask($task_id) {
        $redis = Cache::redis();
        $timer_id = $redis->hGet(self::TIMER_TIME_QUEUE, $task_id);
        $redis->hDel(self::TIMER_QUEUE, $task_id);
        $redis->hDel(self::TIMER_TIME_QUEUE, $task_id);
        $redis->hDel(self::SWOOLE_TASK_WAIT, $task_id);
        if ($timer_id) {
            swoole_timer_clear($timer_id);
        }
    }
495071
public void cancel(final int id) {
        final BaseNotificationItem notification = remove(id);

        if (notification == null) {
            return;
        }

        notification.cancel();
    }
163269
public void cancelTimer() {
		synchronized (cTimerLock) {
			if (proxyTimeoutTask != null && proxyBranchTimerStarted) {
				proxyTimeoutTask.cancel();
				proxyTimeoutTask = null;
				proxyBranchTimerStarted = false;
			}
		}
	}
1084725
public void cancelQueuedTasks() {
      ArrayList<QueueingTask> queuedTasks = new ArrayList<QueueingTask>();
      queue.drainTo(queuedTasks);
      for (QueueingTask task : queuedTasks) {
         task.cancel(false);
      }
   }
908192
private void removeIdleTimeoutConnection() {

    //descending iterator since first from queue are the first to be used
    Iterator<MariaDbPooledConnection> iterator = idleConnections.descendingIterator();

    MariaDbPooledConnection item;

    while (iterator.hasNext()) {
      item = iterator.next();

      long idleTime = System.nanoTime() - item.getLastUsed().get();
      boolean timedOut = idleTime > TimeUnit.SECONDS.toNanos(maxIdleTime);

      boolean shouldBeReleased = false;

      if (globalInfo != null) {

        // idle time is reaching server @@wait_timeout
        if (idleTime > TimeUnit.SECONDS.toNanos(globalInfo.getWaitTimeout() - 45)) {
          shouldBeReleased = true;
        }

        //  idle has reach option maxIdleTime value and pool has more connections than minPoolSiz
        if (timedOut && totalConnection.get() > options.minPoolSize) {
          shouldBeReleased = true;
        }

      } else if (timedOut) {
        shouldBeReleased = true;
      }

      if (shouldBeReleased && idleConnections.remove(item)) {

        totalConnection.decrementAndGet();
        silentCloseConnection(item);
        addConnectionRequest();
        if (logger.isDebugEnabled()) {
          logger.debug(
              "pool {} connection removed due to inactivity (total:{}, active:{}, pending:{})",
              poolTag, totalConnection.get(), getActiveConnections(), pendingRequestNumber.get());
        }

      }
    }

  }
866906
def stop(self):
        """"""
        if self._timer:
            self._timer.stop()
            self._timer.deleteLater()
1209422
def delete(item)
      original_length = @length
      k = 1
      while k <= @length
        if @queue[k] == item
          swap(k, @length)
          @length -= 1
          sink(k)
          @queue.pop
        else
          k += 1
        end
      end
      @length != original_length
    end
1128576
public static function del($timer_id)
    {
        if (self::$_tasks[$timer_id]) {
            unset(self::$_tasks[$timer_id]);
            return swoole_timer_clear($timer_id);
        }

        return false;
    }
545169
private void cancelAppendTimer() {
    if (appendTimer != null) {
      LOGGER.trace("{} - Cancelling append timer", context.getCluster().member().address());
      appendTimer.cancel();
    }
  }