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

Breadcrumb

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

function DeltaStorage::tryUnlink

1 call to DeltaStorage::tryUnlink()
DeltaStorage::collect in vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php

File

vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php, line 73

Class

DeltaStorage
@internal @phan-file-suppress PhanUndeclaredTypeParameter, PhanUndeclaredTypeProperty

Namespace

OpenTelemetry\SDK\Metrics\Stream

Code

private function tryUnlink(Delta $n) : void {
    assert($n->prev !== null);
    
    /** @phpstan-ignore-next-line */
    if ($n->prev->readers == 0) {
        $n->prev = $n->prev->prev;
        return;
    }
    for ($c = $n->prev->prev; $c && ($n->prev->readers & $c->readers) == 0; $c = $c->prev) {
    }
    if ($c && $n->prev->readers === $c->readers) {
        $this->mergeInto($c->metric, $n->prev->metric);
        $n->prev = $n->prev->prev;
    }
}

API Navigation

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