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

Breadcrumb

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

function TimerQueue::swap

2 calls to TimerQueue::swap()
TimerQueue::heapifyDown in vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php
TimerQueue::heapifyUp in vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php

File

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

Class

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

Namespace

Revolt\EventLoop\Internal

Code

private function swap(int $left, int $right) : void {
    $temp = $this->callbacks[$left];
    $this->callbacks[$left] = $this->callbacks[$right];
    $this->pointers[$this->callbacks[$right]->id] = $left;
    $this->callbacks[$right] = $temp;
    $this->pointers[$temp->id] = $right;
}

API Navigation

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