original_string: public function setPriority(float $priority): float
      {
          if ($priority < 0 || $priority > 1) {
              throw new InvalidArgumentError('Priority value must be between 0.0 and 1.0.');
          }
  
          $nice = round(19 - ($priority * 39));
  
          if (!pcntl_setpriority($nice, $this->pid, PRIO_PROCESS)) {
              throw new ForkException('Failed to set the fork\'s priority.');
          }
      }
code: public function setPriority(float $priority): float
      {
          if ($priority < 0 || $priority > 1) {
              throw new InvalidArgumentError('Priority value must be between 0.0 and 1.0.');
          }
  
          $nice = round(19 - ($priority * 39));
  
          if (!pcntl_setpriority($nice, $this->pid, PRIO_PROCESS)) {
              throw new ForkException('Failed to set the fork\'s priority.');
          }
      }
code_tokens: public function setPriority ( float $ priority ) : float { if ( $ priority < 0 || $ priority > 1 ) { throw new InvalidArgumentError ( 'Priority value must be between 0.0 and 1.0.' ) ; } $ nice = round ( 19 - ( $ priority * 39 ) ) ; if ( ! pcntl_setpriority ( $ nice , $ this -> pid , PRIO_PROCESS ) ) { throw new ForkException ( 'Failed to set the fork\'s priority.' ) ; } }
docstring: Sets the fork's scheduling priority as a percentage.
  
  Note that on many systems, only the superuser can increase the priority of a process.
  
  @param float $priority A priority value between 0 and 1.
  
  @throws InvalidArgumentError If the given priority is an invalid value.
  @throws ForkException        If the operation failed.
  
  @see Fork::getPriority()
docstring_tokens: Sets the fork s scheduling priority as a percentage .