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

Breadcrumb

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

function TimerQueue::heapifyUp

Parameters

int $node Rebuild the data array from the given node upward.:

2 calls to TimerQueue::heapifyUp()
TimerQueue::insert in vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php
Inserts the callback into the queue.
TimerQueue::removeAndRebuild in vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php

File

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

Class

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

Namespace

Revolt\EventLoop\Internal

Code

private function heapifyUp(int $node) : void {
    $entry = $this->callbacks[$node];
    while ($node !== 0 && $entry->expiration < $this->callbacks[$parent = $node - 1 >> 1]->expiration) {
        $this->swap($node, $parent);
        $node = $parent;
    }
}

API Navigation

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