Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TimerQueue.php

function TimerQueue::remove

Removes the given callback from the queue.

Time complexity: O(log(n)).

File

vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php, line 41

Class

TimerQueue
Uses a binary tree stored in an array to implement a heap.

Namespace

Revolt\EventLoop\Internal

Code

public function remove(TimerCallback $callback) : void {
    $id = $callback->id;
    if (!isset($this->pointers[$id])) {
        return;
    }
    $this->removeAndRebuild($this->pointers[$id]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal