public function prioritize(/*string*/ $id, /*int*/ $newPriority) {
    // Normalize priority.
    $newPriority = intval($newPriority);

    // The priority must be valid.
    if(self::PRIO_START <= $newPriority && self::PRIO_END >= $newPriority) {
      // The new priority must be different than old one.
      if(
        isset($this->priorities[$id]) &&
        $newPriority !== ($priority = $this->priorities[$id])
      ) {
        // Get the callback.
        $callback = $this->callbacks[$priority][$id];

        // Unregister from old priority.
        $this->releaseImpl($id, $priority);

        // Register new callback at the new priority.
        $this->registerImpl($id, $callback, $newPriority);
      }
    }
  }